on 03-11-2008 9:35 PM
Hi,
I have a table of keys. My start position is that there are 20 lines in the table and few lines are selected (highlighted).
I want to allow the user to mark another line. Once a line is pressed I add few more lines with the key selected to another table.
1. My problem is how to identify the new selection while the user press the ctrl or the shift key...
if he just presses the key table and gets a new selection (and all the rest of the selected keys disappear) than it is not a problem. I identify it via the new_selection parameter.
if he presses while using the ctrl button, I get the lead selection and not the new line he pressed.
I do not know how to test even the shift key press.
2. I noticed that once I change the table parameter selectionMode to Multi (from auto) I get no new_selection parameter. can someone explain this?
Thanks,
Itay
Hello, Itay,
One of the ways to achieve what you want is to code the onSelect event (or the onLeadSelect event) and use the GET_SELECTED_ELEMENTS method from the context node (interface IF_WD_CONTEXT_NODE).
Hope this helps you!
Regards,
Andre
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks,
but it doesn't help.
I need to know which one is the new selection the user clicked on.
The only way I see is to save the selection before the press and then after the press to compare them...
This is an "ugly" solution. I thought there might be something nicer. This is my first WD4A app...
Regards,
Itay
Hi Itay,
I worked for a similar problem and couldn't find a direct solution.
But i can explain the workaround.
As you mentioned you already have a set of selected rows of the table in a different table in context.
Now when the user selects another row using ctrl then capture all the selected rows using GET_SELECTED_ITEMS. Note that the ON LEAD SELECT doesn't get triggered so you might have to call the above mentioned method in the wddomodify method.
Now compare the selected items with the original table and add the new ones.
Regards,
Kinshuk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.