cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in selecting Radiobutton

Former Member
0 Kudos

hI EXPERTS,

i hv created radiobutton, but bydefault it is only selecting 1 button whose index i hv put in WDDOINITmethod. If i select other radiobutton still it is selecting bydefault radiobutton. how to rectify?

Thanks in adv,

sanjay

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sanjay,

Did you set your "Key to Select" property? If not then try assining some unique value to each radio button like a, b , c e.t.c. This should solve your single radio button selection issue.

Thank You,

Gajendra.

Former Member
0 Kudos

Hi,

I guess grouping is done properly. Same group Id should be given in the SelectedKey property of both radiobuttons.

For Ex:

Create one attributes for Gender of type char1

To the SelectedKey propetrty of both radiobuttons, bind to this attributes.

And set key to select (M-male) to the 1st and F-female to the 2nd radiobutton.

Now, by default set the value as M to the Gender attribute in DOINIT and also in the event of radiobutton selection, set the

value to the radibutton selected to this Gender attribute.

Is this clear.

Regards,

Lekha.

Former Member
0 Kudos

thanks for reply. i am not getting index after selecting particular radiobutton in v_index i.e

v_Index = Items_node->GET_LEAD_SELECTION_INDEX( ).

I guess this is the proplem,how to solve this

Former Member
0 Kudos

Hi,

Are these radiobuttons are a part of table ui element or standalone ones.

Regards,

Lekha.

Former Member
0 Kudos

I didn't get u clearly. i hv just now only created radiobutton. and after debugging i came to know that

particular index in not selected for corresponding radiobutton.

thanks

Former Member
0 Kudos

Hi,

I mean, do you have the Table UI element and inside these the radiobuttons are there for the columns.

Or

In a view, you have only these radiobuttons standalone.

In the radioselection event,

check this peice of code for reference -

***Declarations for the context element
  DATA:
    ls_context TYPE wd_this->element_context,
*  "GROUP is a stringtype  context attribute bound to the Selectedkey property of
* both radiobuttons
    lv_group LIKE ls_context-group.             
* display the value of the key attribute
  wd_comp_controller->GV_VIEW_TYPE = wdevent->get_string( wd_assist->GC_key ).     "'KEY'

*Move the type of display to the context attribute
  lv_group = wd_comp_controller->GV_VIEW_TYPE. "for me the values are DW or CN

* get element via lead selection
  wd_comp_controller->gref_element = wd_context->get_element(  ).

  if wd_comp_controller->gref_element is not initial.
* Set single attribute
    CALL METHOD wd_comp_controller->gref_element->SET_ATTRIBUTE
      EXPORTING
        VALUE = lv_group
        NAME  = wd_assist->gc_group.         "`GROUP`
  endif.                                   "IF wd_comp_controller->gref_element is not initial.

What is the cardinality of the items_node.

For me, group is direclty under the root context.

Regards,

Lekha.