on 09-25-2013 4:40 PM
Hi everyone,
How can I select a table row just clicking on a cell?
I would like to get the row index in which I click.
Thanks a lot!!
Thanks for you replies!
Eventually I did not need to do that! After one day struggling with it!!...Grrrrrrr
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David,
You need to trigger an event when you click on cell.
In that event try to get the table index of that particular column by reading internal table using that field. After getting index write the following code. It will set the lead selection to the desired row by passing index no.
DATA lv_set_ind TYPE i.
lo_nd_parts_consumed1 = wd_context->get_child_node( name = wd_this->wdctx_parts_consumed ).
lo_el_parts_consumed1 = lo_nd_parts_consumed1->get_element( ).
CALL METHOD lo_nd_parts_consumed1->set_lead_selection_index
EXPORTING
index = lv_set_ind.
Hope it helps.
Happy Coding,
Keshav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If in the row / column in which you click in associated with action then perform, parameter mapping for the action linked to the element.
You can map a link/button with the node element. The mapping is performed (only firsttime i.e. once in the WDMODIFYVIEW ). So when the user clicks on the link/button(or any ui element which supports parameter mapping) then you will have the selected element in the table as parameter of the action linked to the ui element.
Refer this document for more help: http://help.sap.com/saphelp_nw04s/helpdata/en/33/b11042705a5533e10000000a155106/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/f9/64c0410c2dcc17e10000000a155106/frameset.htm
Regards,
Sharath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Change your table cell ( Column) to Link to Action, then in onAction of link_to_action cell editor, write the below code
DATA lr_el_element TYPE REF TO if_wd_context_element.
DATA lv_index TYPE i.
lr_el_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
lv_index = lr_el_element->get_index( ).
Here lv_index contains the clicked index. Now use set_lead_selection_index( ) method to set the selection for row.
lo_nd_node->set_lead_selection_index( lv_index ). " here lo_nd_node is the reference of your node
Hope this helps u.,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.