cancel
Showing results for 
Search instead for 
Did you mean: 

Using Radiobutton in a table in Column

Former Member
0 Kudos

Dear all,

Can anyone please help me how to use radio button in a webdynpro table in a column?, In a column i want to use radio button and i want to select one button at a time in a column.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kavin,

Search here you get lot of examples..

Also go through this example...

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0aba847-ff58-2c10-4a98-c0fad334c...

Cheers,

Kris.

Former Member
0 Kudos

Hi Kris,

Thank you for your reply, my requirement is to select one radio button in a column the the document provided by you is selecting button in a row.

Former Member
0 Kudos

Hi Kavin,

Kindly explain your requirement please.

cheers,

Kris.

Former Member
0 Kudos

Dear Kris,

In table the values will come randomly, for eg. first time two values will come and next time three values will come, in that i have to select radio button in a column for only one value in a total table.

saravanan_narayanan
Active Contributor
0 Kudos

Hello Kavin,

do the following

1. Create an context attribute (say SELECTED_VALUE) directly under the ROOT Context

2. Create a table column in your table UI element and add Radio Button cell editor

3. bind the keyToSelect propery of the radio button to the context attribute in the Table's Context node

4. bind the selectedKey property of the radio button to the SELECTED_VALUE context attribute.

whenever the the user is selecting the column radio button, the selected value will be populated in the SELECTED_VALUE context attribute.

Hope this helps.

BR, Saravanan

Former Member
0 Kudos

Hi saravanan,

Thanks for your useful points.But if i do like your sayings means at run time i can select more than one radio button from the table.any suggestions pls.

saravanan_narayanan
Active Contributor
0 Kudos

Hello Kavin,

with this approach, you can't select more than one radio button at runtime. this is because the keyToSelect and the selectedValue will not be same for more one radio button at any point of time.

BR, Saravanan

Gowtham
Contributor
0 Kudos

Hi kavin

For selecting one radio button at run time give the attribute type as WDY_BOOLEAN and give Key to select fields as your required field from table to get one selected value at run time.

Former Member
0 Kudos

Dear Gowtham,

Thank you for ur reply, this is what i required, but how to select particular row value of selected radio button.

Edited by: Kavin L on Oct 3, 2011 1:21 PM

Gowtham
Contributor
0 Kudos

Hi kavin,

Try dynamic lead select option.if u select one Radio button means the particular row will get lead selected.i think that ll solve your problem.check the coding

DATA LO_ND_BBU_NODE           TYPE REF TO IF_WD_CONTEXT_NODE.
  DATA LO_EL_BBU_NODE           TYPE REF TO IF_WD_CONTEXT_ELEMENT.

   LO_ND_BBU_NODE = WD_CONTEXT->GET_CHILD_NODE( NAME = 'VENDOR_DETAIL' ).

  LO_EL_BBU_NODE = WDEVENT->GET_CONTEXT_ELEMENT( 'CONTEXT_ELEMENT' ).

  LO_ND_BBU_NODE->SET_LEAD_SELECTION( ELEMENT = LO_EL_BBU_NODE ).

Edited by: Gowtham.A on Oct 3, 2011 1:30 PM

Former Member
0 Kudos

Dear Gowtham,

Thank you for your answer, this is working fine for me.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hai,

Goto code wizard. select the table option and click on context then bind with node. After that change the table cell editor to radio button option then you get the radio button in table after applying the binding.

Former Member
0 Kudos

Check the standard exmaple for the same WDR_TEST_TABLE for table cell editors.

Former Member
0 Kudos

Dear Lekha,

Thank you for your reply, In the standard one there is no example for using radio button in a table.

Former Member
0 Kudos

check for the TABLE CELL EDITORS / standard cell editors option when you test it.