Selecting a row without the lead selection
I need to select the entire row with the hand icon.
how to achieve this?
Uday Gubbala replied
It is possible to select multiple rows in a table control. Using LeadSelection you can atmost select 1 row at a time. To be able to select multiple rows you make use of what is called as "Selection". You have the corresponding method (SET_SELECTED) available in interface if_wd_context_node. Suppose you have a table which is based on a context node NODE1 then you can use the below coding to select all the rows of the table programmatically. Also remember that you should uncheck the checkbox for "Initialization Lead Selection" of the context node which you are binding to the table control.
METHOD onactiondeselect_all_rows . DATA: wd_node TYPE REF TO if_wd_context_node, lines_count TYPE i VALUE 0. wd_node = wd_context->get_child_node( name = 'NODE1' ). CALL METHOD wd_node->get_element_count RECEIVING count = lines_count. DO lines_count TIMES. wd_node->set_selected( flag = '' index = sy-index ). ENDDO. ENDMETHOD.