on 07-28-2008 9:58 AM
Hi All,
I'm using a Table with a TreeBYKeyTableColumn in order to display a tree.
I have coded a search function in order to find a specifc item in the tree.
and i want that once the item found , that the tree shows the item i just found.
So to do that, i search in the context , and find the item.
Put the lead selection of the item using set_lead_selection.
then , i get the lead_selection_index using : get_lead_selection_index( ) .
Then i try to position the visible row of the table on that index using : Set_first_visible_row
It seems to work , except that the visible row showed is not the right one.
For instance , get_lead_selection_index returns 4 . the lead selection is well on the 4 , but Then i call Set_first_visible_row( 4 ) . the effective visible row see in the tree could be 6 . (the lead selection staying well on 4 )
I thought it was because the way my context was filled. But i changed my code to fill the context in exactly the same order the tree is shown , but no difference.
Would you have an idea? Or somebody could explain me how Set_first_visible_row works when there is a TreeByKeyTableColum in the table.
Note, that my tree is also full expanded.
thanks in advance.
Ok, i found a solution , for whom interrested :
You have to use if_wd_tavle_method_hdnl interface.
data lwd_table type ref to cl_wd_table.
lwd_table ?= wd_this->mo_view->get_element( iv_table_name ).
data: mh type ref to if_wd_table_method_hndl.
mh ?= lwd_table->_method_handler.
mh->expand_into_element( element = io_el_tree ).
mh->make_element_visible( element = io_el_tree ).
Edited by: Jean-Philippe MEOLA on Jul 28, 2008 11:39 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
9 | |
9 | |
8 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.