cancel
Showing results for 
Search instead for 
Did you mean: 

How to set lead selection for a row when clicked on perticular cell of that row in table ui element.

Former Member
0 Kudos

Hello experts,

                       I have used a table ui element and in that i want to set lead selection to a row  when i am selecting any of the row's cell at run time.

How to do this task.

Accepted Solutions (1)

Accepted Solutions (1)

chengalarayulu
Active Contributor
0 Kudos

Vishal,

As you said, if it needs to be selected based on Cell means, the UI element(CellEditor) should be LinkToAction/Button.

Then in that UI element's action we can set LeadSelection easily.

data: lo_context_element type ref to if_wd_context_element,

         lv_index type i.

lo_context_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).

lv_index = lo_context_element->get_index( ).

lo_<node_table>->set_lead_selection_index( lv_index ).

This will happen dynamically when you click/select on Cell Action.

Former Member
0 Kudos

in line  wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).

what is  'CONTEXT_ELEMENT'

chengalarayulu
Active Contributor
0 Kudos

It returns you mouse clicked element of Table.

Former Member
0 Kudos

thanks for help its working

Pratik2228
Participant
0 Kudos

hi sir,

i have the same requirement can u please share the code or what have to be done

Pratik2228
Participant
0 Kudos

hi,

sir but when user sorts a row the index changes,and the selected row also changes,

is their any way to select a row even if user sorts, the row remains selected.

Answers (0)