2009 Feb 03 11:25 AM
Hi all,
i am working on alv tree (CL_GUI_COLUMN_TREE) . i have expand/collapse buttons. So if I select a node and hit the expand button, the program should expand everything below it .
2. is there is any single click event in event table(TYPE CNTL_SIMPLE_EVENTS).
Thanks and regards,
Tarak
Hi all,
i am working on alv tree (CL_GUI_COLUMN_TREE) . i have expand/collapse buttons. So if I select a node and hit the expand button, the program should expand everything below it .
2. is there is any single click event in event table(TYPE CNTL_SIMPLE_EVENTS).
Thanks and regards,
Tarak
2009 Feb 03 11:28 AM
Hi,
Class CL_GUI_COLUMN_TREE inherit methods of class CL_TREE_CONTROL_BASE, so just use the method expand_root_nodes
CALL METHOD tree->expand_root_nodes
EXPORTING level_count = level_count
expand_subtree = expand_subtree
EXCEPTIONS failed = 1
illegal_level_count = 2
cntl_system_error = 3.
Where level_count :
0: Only the root nodes are expanded - no underlying nodes.
1: The current node and the next hierarchy level are expanded.
and expand_subtree
'X': Expands all nodes in the subtree. The system ignores any value of LEVEL_COUNT
To collapse all nodes use method COLLAPSE_ALL_NODES
Look at SAP Tree and Tree Model (BC-CI) or SAP Tree Model for documentation and read SAP demo programs like SAPCOLUMN_TREE_CONTROL_DEMO, SAPSIMPLE_TREE_CONTROL_DEMO, and
SAPTLIST_TREE_CONTROL_DEMO, BCALV_TREE_SIMPLE_DEMO and BCALV_TREE_DEMO
Thanks
Arun Kayal
2009 Feb 03 11:44 AM
Hi Arun Kayal,
I got the method EXPAND_NODE but i have to pass the node_key which i got only if there are any single Click event .
plz help me.
Thanks,
Tarak
2009 Feb 03 11:50 AM
Hi,
Use selection_changed event to collapse or expand all nodes when left mouse button clicked on any node and call methods collapse_all_nodes and expand_node in the event handler method.
Selection_changed event triggers for every left click on any node
you can refer the given below link for demo program
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCITREE/BCCITREE.pdf
Thanks
Arun Kayal.
Edited by: Arun Kayal on Feb 3, 2009 12:55 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |