on 12-20-2013 10:10 AM
Hi Monika,
LEAD SELECTION will not work for ROW REPEATER as it does in TABLE UI element.
Here is a solution,
In the action bound to your delete button add a new importing parameter called CONTEXT_ELEMENT of type IF_WD_CONTEXT_ELEMENT.
Ensure that you select the RefTo check box.
Do not use any other name for this parameter. Now, the appropriate row element will be available automatically during runtime by using this parameter.
Here is a sample code to delete the selected row based on this parameter
onactiondelete .
DATA: lo_node_country TYPE REF TO if_wd_context_node.
lo_node_country = wd_context->get_child_node( wd_this->wdctx_country ).
IF context_element IS BOUND.
lo_node_country->remove_element( context_element ).
ENDIF.
ENDMETHOD.
onactiondelete .
Warm Regards,
Shibin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Create a boolen type in your context node, the one that is bound to the row repeater and bind it to a check box, place the check box either at the begining or end of each row.
This will allow you to select 1 or more rows for deletion.
On click of delete button, loop throught the node and delete selected rows.
Regards,
Shibin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Have you tried the below code to get the index of the row. Write the below code in onAction of delete button.
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( ).
lv_index will contain the deleted index.
Hope this helps u,
Regards,
Kiran
If the name of the node is 'ND_TASK_R' then below code can be used:
Please replace 'ND_TASK_R' with the name of your node and then test.
DATA LO_ND_ND_TASK_R TYPE REF TO IF_WD_CONTEXT_NODE.
DATA LO_EL_ND_TASK_R TYPE REF TO IF_WD_CONTEXT_ELEMENT.
DATA LS_ND_TASK_R TYPE WD_THIS->ELEMENT_ND_TASK_R.
LO_EL_ND_TASK_R = WDEVENT->GET_CONTEXT_ELEMENT( 'CONTEXT_ELEMENT').
LO_ND_ND_TASK_R = LO_EL_ND_TASK_R->GET_NODE( ).
LO_EL_ND_TASK_R->GET_STATIC_ATTRIBUTES(
IMPORTING
STATIC_ATTRIBUTES = LS_ND_TASK_R ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
67 | |
26 | |
9 | |
9 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.