on 01-07-2008 4:02 AM
Hi All,
I just wondering if i can expand tree in wda by default so all subordinats are shown w/o clicking nodes one by one .
What method should i use?
Thanks a lot for your sharing and consideration.
BR,Drikavide
Hi Ardhik Drikavide ,
For expanding all the nodes in the tree you have to loop the whole data in the tree, inside each loop , based on index you have to set the expand property.
ie Set each node as expanded and then bind the itab to tree.. thats all.
Regards
Sarath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ardhik Drikavide ,
Really sorry , i cant login to system right now, or else i can paste the code directly. how i solved this problem is like.. i loop the itab , then on each loop , set the property of the element to expanded then i bind the element to the node... Once this node is binded to the tree UI then it will Display all expanded.
Regards
Sarath
Hi Ardhik Drikavide
,
For the node thats binded to the table, create an attribute say is_epanded and bind this attribute to the is expanded property of the tree.
Now for expanding all the nodes read the node to an itab
Loop the itab
Set the value of field is expanded as true..
Endloop
Bind back the itab
Like
CALL METHOD node_name->get_static_attributes_table
EXPORTING
from = 1
to = 2147483647
IMPORTING
table = lt_tab
.
****Expand all Nodes and Bind
LOOP lt_tab INTO wa_tab.
IF condition.
wa_tab-expanded = abap_false.
ELSE.
wa_tab-expanded = abap_true.
ENDIF.
APPEND wa_tab TO itab2.
ENDLOOP.
node_name->bind_table(itab2 ).
Regards,
Sarath Satheesan
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.