on 02-22-2011 7:45 PM
Hi experts,
I have a requirement from customer to have a radio button inside a table of a WebDynpro ABAP application. For example, a table containing list of mobile numbers.
The columns has
Mobile Model, Cost, Company name, and a radio button named choice.
Only one record and hence one radio button can be chosen at a given time.
When the user clicks on the radio button choice corresponding to the row of the mobile of his choice, the row should get lead selected .
When the user chooses a different choice radio button (corresponding to another mobile) the old radio button choice should get deselected, new row and its radio button should be lead selected.
Can you give me the code how to deselect the remaining radio buttons when a user selects on one Radio button
Hi Sandeep ,
Have a look at the events of table UI element and its paramaters , Here's the link.
[Link|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/2d/390e422dfcde2ce10000000a1550b0/content.htm]
The event 'Onselect' or 'OnLeadSelect' provides 4 standard paramaters , out of which , OLD_LEAD_SELECTION/OLD_ROW_ELEMENT is one of them.
So you could use this element and set the attribute value (Which is bound to the radio button) to abap_false.
Although I am not sure as to which event ight trigger ( ON_LEAD_SELECT / ON_SELECT ).:)
Thanks,
Aditya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Check the attribute that is bound to the setselected property , you should clear that attribute .
OLD_LEAD_SELECTION / OLD_ROW_ELEMENT provides the previously seleced element.
so just set the attribute of the element to abap_false.
OLD_LEAD_SELECTION->set_attribute( NAME = 'NAME_OF_ATTRIBUTE_BOUND_TO_SET_SELECTED'
VALUE = abap_false).
This should work out.
Thanks,
Aditya.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.