on 03-12-2015 1:20 PM
Hi All,
I have used Table UI element and have used Filter to the Table.
The Filter functionality is working fine.
In my Table the First record is always selected. So when I apply filter and i get the results of the filter in that no row is selected.
I want to make First row of the Filtered result as selected. Can you please let me know how make the First record of the filter result as selected.
Also I want to read the filter results in the modifyview method. How to read the filtered results.
Thanks,
Bharat
Hi Bharat,
To mark first line of filtered result, write the below logic in FILTER action handler method.
data lt_data TYPE WDR_TABLE_ROW_DATA_TAB.
data ls_data like LINE OF lt_data.
data lo_node TYPE REF TO if_wd_context_node.
" Get data of filtered result
lt_data = wd_this->table_method_hndl->get_table_data( ).
LOOP AT lt_data INTO ls_data.
IF sy-tabix = 1. " for first line
" Get context node of filter line
lo_node = ls_data-context_element->get_node( ).
IF lo_node is BOUND." Mark first line
lo_node->set_lead_selection_index( 1 ).
ENDIF.
ENDIF.
exit." exit loop
ENDLOOP.
Similarly, to get fitler result ....
lt_data = wd_this->table_method_hndl->get_table_data( ).
Hope this resolves your issue.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.