delete row by button in popin
i am using table popin toggle cell, by this i am opening rows.
i have a delete button in popin, and i want to delete row by this popin button, how can i identify in which row , in the popin the button is pressed. so that i can delete that row only.
i have tried by which row is open, delete that, but user can open more than one popin cell, and that button is deleting all open row.
please give your valuable suggestion
Edited by: bala on Sep 25, 2008 9:19 AM
Yogesh Kumar replied
yes you can delete the row by setting lead selection in the event of delete button,
use this coding,
data lo_nd_nodename type ref to if_wd_context_node.
data lo_el_nodename type ref to if_wd_context_element.
data ls_nodename type wd_this->element_nodename.
navigate from <CONTEXT> to <NODENAME> via lead selection
lo_nd_nodename = wd_context->get_child_node( name = wd_this->wdctx_nodename ).
get element via lead selection
lo_el_nodename = lo_nd_nodename->get_element( ).
lo_el_nodename = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
@TODO handle not set lead selection
if lo_el_nodename is not initial.
get all declared attributes
static_attributes = ls_nodename ).
if lo_nd_nodename is not initial.
call method lo_nd_nodename->set_lead_selection
element = lo_el_nodename.