cancel
Showing results for 
Search instead for 
Did you mean: 

DropDownByKey, RadioButtonGroupByKey - how to set default selection

matt
Active Contributor
0 Kudos

I'm working through the examples of Ulli Hoffmann (Web Dynpro for ABAP), and have seen that if I use DropDownByIndex (or RadioButtonGroupByIndex ), I can use the set_lead_selection_index method to determine the default dropdown selection to be displayed (or radio button to be selected).

But I can't work out how to do the same for DropDownByKey or RadioButtonGroupByKey. When the application is first run, the selection is blank (or in the case of RadioButtonGroupByKey, no radio button is selected). What do I need to do to set the default when using the ...ByKey components?

Thanks

matt

Accepted Solutions (0)

Answers (2)

Answers (2)

arjun_thakur
Active Contributor
0 Kudos

Hi Matt,

To set the default value of the RadioButtonGroupByKey UI element, just set the default value of the attribute which is binded to the selected key property of the RadioButtonGroupByKey. Each radio button is associated with a key. Which ever radio button you want to selected bu default, just give its key value in the default value of that attribute. That radio button will be selected by default.

You can also refer the standard component WDR_TEST_EVENTS. It will give you a good idea.

To set a default value in drop down by key, refer to the code provided by Alejandro Bindi in this [thread|]

I hope it helps.

Regards,

Arjun

Edited by: Arjun on Mar 2, 2009 4:24 PM

Former Member
0 Kudos

This message was moderated.