cancel
Showing results for 
Search instead for 
Did you mean: 

Unselect all the rows when display my table the first time

Former Member
0 Kudos

Hi all,

When I execute my webdynpro the first time my table is displayed with the first row selected, but this is false, this line is not selected.

If i execute the method get_selected_elements don't return anything in the table, but if i do a Click in this row then works fine.

I tried to unselect all the rows when i display the table the first time in the method WDDOINIT doing the following;

DATA lo_nd_my_table TYPE REF TO if_wd_context_node.
  DATA: lt_elements TYPE wdr_context_element_set,
             lo_element TYPE REF TO if_wd_context_element,
             lo_node TYPE REF TO if_wd_context_node.

  lo_nd_my_table = wd_context->get_child_node( name = wd_this->wdctx_my_table ).
  lt_elements = lo_nd_my_table->get_elements( ).
  LOOP AT lt_elements INTO lo_element.
    lo_element->set_selected( SPACE ).
  ENDLOOP.

But, doesn't work...

How can i do it?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

Try unticking the Initialisation Lead selection property for the context node bound to the table.

This will make all rows unselected.

Thanks,

aditya.

Answers (1)

Answers (1)

Former Member
0 Kudos

hi,Husalban RM .

You don't need to DE-SELECT each element of the context node.

You can try the following:



lo_node->set_lead_selection_index( -1 ).
"lo_node is the context node which is bound to your table.

Hope it can help you a little.

Best wishes.