cancel
Showing results for 
Search instead for 
Did you mean: 

Use Table UI element irrespective of Lead Selection

Former Member
0 Kudos

Hi Experts,

I have a button column in table UI Element.

I want to invoke a method/action on button click of a row irrespective

of lead selection. Or set lead selection to the related row and rest of process in regular way.

That means, if the lead selection is set to 1st row

but user clicks button in 7th row, how do I invoke action/method for 7th row/element.

Is there a function to find out row/index number for click?(In my case, 7).

Any help will be appreciated.

Thanks,

Achyut

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

When you have any action triggered from a row of a table, use the method

wdevent->get_context_element( 'CONTEXT_ELEMENT' )

in the event handler to get a reference of if_wd_context_element. You can then use the method element->get_static_attributes to get the values in the row. Then do your processing. This holds good whether you have buttons, link to actions, link to url etc in your table. In any case, the statement will return you the element that was selected.

Regards,

Nithya

Answers (1)

Answers (1)

Former Member
0 Kudos

hi achyut..

your on action method by defaul has a wdevent import parameter.

so,


  data:
      eve type ref to if_wd_context_element.
      
EVE = wdevent->GET_CONTEXT_ELEMENT( name = 'CONTEXT_ELEMENT' ).

this returns you the context element, then you can use get_static_attributes method of interface if_wd_context_element to fetche the correct row.

---regards,

alex b justin