on 07-09-2014 3:21 PM
Hello expert,
I have a table in my WD abap view, I use MasterColumn to display the tree structure, everything works just fine.
However I encounter one problem:
If I open the tree structure and select one node (table row selection), the event onLeadSelectis triggered, this is correct. However if I collapse any parent nodes (along the tree path) of the selected node, WD puts the selection on the clicked parent and thus the event onLeadSelect is triggered for the parent. This is a strange behavior, because when I collapse a node, I certainly don't want to trigger the onLeadSelect event for the node, becaseu this would invoke the function linked to the event which is only supposed to be triggered when you explicitly select the table row. (BTW, if you don't select any child nodes, then collapse the parent, it does NOT trigger the event).
I've looked into the wdevent data to see if I can differentiate between the event of node collapsing and row selecting, event data is exact same for both cases, thus I have no way to stop the event handler in case of node collapsing.
Anyone had this issue and a solution for this?
Thanks
Jayson
Really no one faced this problem? I thought this is not a rare requirement to avoid triggering onSelect event when collapsing tree node.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jayson,
Its the behavior of the tree element, the lead selection of child is carried over to the parent.
Whenever there is lead selection set and on toggling of tree node, first OnToggle event triggers and then OnLeadSelect triggers. So you can control the execution of onLeadSelect by using EXPANDED parameter of event OnToggle.
Please refer the below steps:
wd_this->gv_expanded = expanded.
Hope this helps you.
Regards,
Rama
User | Count |
---|---|
78 | |
11 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.