on 09-04-2012 7:13 AM
Hi, I wanted to be able to get the ID of the selected row using a check box. For example
ID | |
---|---|
[ ] | 123 |
[ ] | 456 |
[ ] | 789 |
[Get Selected Row] - Button
when I check the 1st row's check box. then click the [Get Selected Row] Button, I would get 123
ID | |
---|---|
[X] | 123 |
[ ] | 456 |
[ ] | 789 |
[Get Selected Row] - Button
when I check the 2nd and 3rd row's check box, i would get 456, 789
ID | |
---|---|
[ ] | 123 |
[X] | 456 |
[X] | 789 |
[Get Selected Row] - Button
this is the only option, i know the row selection of the table, but i would like to use the check box as an alternative solution.
Thanks in advance!
Hello,
in your wdDoModifyView you should try this:
IWDCheckBox cb_alt = (IWDCheckBox)view.getElement("your_checkbox_id");
cb_alt.mappingOfOnToggle().addSourceMapping("nodeElement", "row");
Assign an action to your checkbox onToggle event and add a parameter "row" with type com.sap.tc.webdynpro.progmodel.api.IWDNodeElement.
In your action assigned to the onToggle event of your checkbox do the you can get the index of the actual checkbox and read the appropriate ID:
wdContext.mynode.getMynodeElementAt(row.index()).getID();
Regards,
Bernd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what's the problem?????
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.