cancel
Showing results for 
Search instead for 
Did you mean: 

Radio Button

Former Member
0 Kudos

Hi,

The RadioButton UI elements where I have inserted have the state (on) . How can make them off ?

Regards

Marco M.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

do you have an example with ...

Former Member
0 Kudos

Hi, Follow these steps; 1.Create a node 'CN_RADIO', cardinality 0:n. Under this node create an attribute 'KEY' type string. 2. Place a RadioButtonBroupByIndex uielement on your view 3. Bind the texts property of the radiobutton with the newly created attribute 4. Place the following code in WDDOINIT method, to create radio button list

* Fill Radiobutton list
  DATA: itemlist TYPE if_viewname=>elements_cn_radio,
        w_list LIKE LINE OF itemlist.

  w_list-ca_key = 'Black'.
  APPEND w_list TO itemlist.
  w_list-ca_key = 'White'.
  APPEND w_list TO itemlist.
  w_list-ca_key = 'Orange'.
  APPEND w_list TO itemlist.
  w_list-ca_key = 'Pink'.
  APPEND w_list TO itemlist.

  DATA: items_node TYPE REF TO if_wd_context_node.

  items_node = wd_context->get_child_node( name = `CN_RADIO` ).
  items_node->bind_table( itemlist ).
  items_node->set_lead_selection_index( 1 ).
Regards, Radhika.

Former Member
0 Kudos

thx Radhika

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello ,

Radio Button UI element has a property ' Key to Select ' . Now if this value is set to 1 and you bind an context attribute

to the property 'Selected Key ' and change the value of context attribute to 2 . Radio button will be off .

If I am not able to answer your question , Can you please explain your problem in more detail .

Regards

Vivek

Former Member
0 Kudos

vievek thank you .

If I click the second RB the first button is still on and the second button too. How can I make than the first button

off if the second button is on.

Regards

Marco

Former Member
0 Kudos

Hi, I think your are using Radiobutton uielement, try RadioButtonGroupbyIndex instead. Regards, Radhika.