on 07-06-2011 9:37 AM
Expecting the user to press "Ctrl" when selecting multple rows is very unfriendly and unintuitive. We'd like the row selection to work as in ALV where you just select multiple rows by clicking on them.
We've set the tables rowSelectable to true and selectionMode to 'multi' but we still cannot select multiple rows without the CTRL hotkey.
This issue apparently [arose before|] but wasn't resolved.
System Details
SAP_ABA 701 0006 SAPKA70106
SAP_BASIS 701 0006 SAPKB70106
SAP_AP 700 0019 SAPKNA7019
Hello Marc,
try the following
in the table properties
set 'selectionChangeBehaviour' to Manual
set 'selectionMode' to Multi
create an action for OnSelect event (create with the option 'Transfer UI event Parameters )
in the OnSelect event handler method
get the index of the NEW_LEAD_SELECTION element by calling new_lead_selection->get_index( )
set the selected index of the context by calling IF_WD_CONTEXT_NODE->get_selected( index = lv_index )
this will work like the 'ctrl' selection.
hope this helps.
BR, Saravanan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Marc,
you need to call IF_WD_CONTEXT_NODE->set_selected(index = lv_index) sorry for the typo in my previous comment.
by calling IF_WD_CONTEXT_NODE->set_selected method wont remove the lead selection.
to unselect the records, you can call the same method by passing the FLAG value as abap_false.
so for your usecase the logic will be like this in the ON_SELECT event handler
1. get the index of the new_lead_selection
2. check whether this is already seleted in the context node by calling IF_WD_CONTEXT_NODE->IS_selected
3. if already selected then call IF_WD_CONTEXT_NODE->set_selected( flag = abap_false index = lv_index)
if not selected then call IF_WD_CONTEXT_NODE->set_selected( index = lv_index )
Hope this solved your problem.
BR, Saravanan
Edited by: Saraa_n on Jul 6, 2011 11:52 AM
Wonderful thanks!
lv_index = new_lead_selection->get_index( ).
lo_node = NEW_LEAD_SELECTION->get_node( ).
IF lo_node->is_selected( index = lv_index ) = 'X'.
lo_node->set_selected( flag = abap_false index = lv_index ). " Deselect
ELSE.
lo_node->set_selected( lv_index ). " Select
ENDIF.
I still think WDA should support this behaviour as an option for the table control!
Hi Marc,
In table properties if you select selectionmode to MULTI. In table at first starting column you get one menu type option. This is
for Select All and Deselect All.
OR
You can create one button for select all and write code to select all rows in taht table.
using set_selected method.
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We have already got a select all menu. What we need is select multiple without Ctrl. I don't know which planet the SAP developers live (and the HTML SELECT box developers) on but in the real world, nobody knows you need to press Ctrl to select multiple options. Maybe Thomas can feed this into the next release??!!
hi..
in webdynpro, in order to select multiple rows we must use Ctrl, even in alv table also.
work around is there, like add one more column to table, add chech box element to that column.. and perform operations based on checkbox selected rows.
Regards
Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.