Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to get selected node in tree control

Former Member
0 Likes
1,533

Hi All,

I have used cl_column_tree_model for displaying data. When user selects a node (by clicking once on it) I wanted to get the selected node by user on the click of a button.

Details of tree control:-

Tree was created with cl_column_tree_model=>node_sel_mode_single.

Now in the PAI logic I'm using

treemodel->get_selected_node method. But its not returning any node niether is it giving any errors.

Can anyone tell me why its happening. Or any other method that can be used to get the selected node.

Thanks,

Stephen

Hi All,

I have used cl_column_tree_model for displaying data. When user selects a node (by clicking once on it) I wanted to get the selected node by user on the click of a button.

Details of tree control:-

Tree was created with cl_column_tree_model=>node_sel_mode_single.

Now in the PAI logic I'm using

treemodel->get_selected_node method. But its not returning any node niether is it giving any errors.

Can anyone tell me why its happening. Or any other method that can be used to get the selected node.

Thanks,

Stephen

2 REPLIES 2
Read only

former_member628175
Active Participant
0 Likes
728

Hi Stephen ,

please see the demo program "SIMPLE_TREE_CONTROL_DEMOCL1" .this will definitely help you

Edit : There is also another program called "SAPCOLUMN_TREE_MODEL_DEMO" which uses similar method mentioned my you .

Regards ,

Shounak M.

Message was edited by: Shounak M

Read only

0 Likes
728

cl_gui_column_tree doesnt have a event for node single click. it has got event for double click.

cl_gui_column_tree=>eventid_node_double_click.

if you still want single click

you can register the event

cl_gui_column_tree=>eventid_link_click and set the node item-calss as link.

Regards

Raja