cancel
Showing results for 
Search instead for 
Did you mean: 

Selecting row of table and process it

ChandraMahajan
Active Contributor
0 Kudos

Hi All,

i have a tale in WD appication. i have requirement as to select one row of it and then porcess it on click of Button. please let me know how to code for this in steps.

Regards,

Chandra

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Chandra,

I would suggest you to have another node with same attributes which would hold the values of selected row. You can fill this node by making use of OnSelect event of table .. once you have the data in node,say selected_entry, you can make use of Get_attribute or get_static_attribute method to fetch the info and play around with same ..

For more detailed info on how you may make use of these methods I would suggest you to read above posts by Koen and Sascha.

I hope this helps. I would request you to close this thread if the query has been resolved.

Regards,

Anoop

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Chandra.

When a user selects a row in a table the lead selection is set to this row.

So in the action handler of your button just get the lead selection element:

table_node->get_element( ).

and do the stuff you need to do with the row.

Hope this helps.

Cheers,

Sascha

UPS .. double post ... sorry

Message was edited by:

Sascha Dingeldey

Former Member
0 Kudos

Hi,

when you have lead selection enabled for your node in the context menu,

you can simply achieve this by defining an action for your button

and there go to your context node

node_x = wd_context->get_child_node( 'X' ).

elem_selection = node_x->get_lead_selection( ).

elem_selection->get_static_attributes( importing stqtic_attributes = ls_selection ).

with ls_selection your structure

grtz

Koen