on 10-14-2005 10:57 AM
Dear colleagues,
I want to insert a new line into a treebykey table after a selected line, is there any good suggestion to do this, or example?
I found there is a method 'GET_TABLE_TREE_LEAD_SELECTION' in 'CL_WD_DYNAMIC_TOOL', but it's just for treebynesting.
Then, I try to use the event 'OnLeadSelect' of the table, but I am not clear about how the parameter of 'new_row_element' and 'old_row_element' should be used.
Thank you.
Swee Hu
Hi Swee,
You can get all selected elements of a context node by calling method GET_SELECTED_ELEMENTS of the context node (interface IF_WD_CONTEXT_NODE). If you need to leadSelection you can use method get_lead_selection (or get_lead_selection_index in case you are only interested in the position of the leadSelection in the table). In case of the *byKey tree-table just insert a new context element at the desired position and make sure that the parent key and key attributes are properly set. Otherwise, the new element wont appear at the proper level. The table renderer automatically calculates the hierarchy depending on the existing key/parent key values of all elements in that "flat structure".
Kind regards,
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.