on 12-19-2013 6:21 AM
Hi,
i removed default lead selection from table ...its working fine but how to deselect lead selection from screen .....please tell me its adj....
hi Ram,
i think you didn't get my requirement....my req is after executing WD component, i mean in browser ...am displying table with fields without lead selection, user selected first row using lead selection when user want's to deselect that row(by double click on the same row) which is selected by user ...how to do this? ...after deselecting user my table dont have any lead selection.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Syed,
I hope your requirement is to deselect the selected row in the table programatically. I think it is not possible. Either you can use a additional checkbox column or the solution provided by Kiran LinktoUI action. When I select the table selection row manually it is unable to reset it in program but when I select via program then it I am able to deselect it.
Let see whether others have any solution to it.
With Regards,
Giriesh M
Hi Syed,
I think I have understood your requirement as below
Let us say we have 2 records in table
Now user clicks on first line, ( select a row ) as below
Again user clicks on second line ( select another row ) as below
Now, user can click on any row to deselect.
Ex. user clicked on first line to deselect
If this is your requirement, please follow my earlier repl for the solution.
Regards,
Rama
Hi Syed,
Syed Sarmath Hussain wrote:
Excately but i don want to select multiple rows .....okay i just want to deselect row which i selected ...by double clicking ........please give the code .it helpful to me...
If you need to select only one row on click and deselect it without using CTRL key.
Please follow steps in my earlier reply and write the below code in event handler method
DATA lo_ctx_element TYPE REF TO if_wd_context_element.
DATA lo_ctx_node TYPE REF TO if_wd_context_node.
DATA lt_selected_elements TYPE wdr_context_element_set.
DATA lo_selected_element TYPE REF TO if_wd_context_element.
lo_ctx_element = wdevent->get_context_element( name =
'NEW_ROW_ELEMENT' ).
IF lo_ctx_element IS NOT BOUND.
RETURN.
ENDIF.
" get node reference
lo_ctx_node = lo_ctx_element->get_node( ).
" get selected elements
lt_selected_elements = lo_ctx_node->get_selected_elements( ).
" de-select all elements except the currenty processing element
LOOP AT lt_selected_elements INTO lo_selected_element.
IF lo_selected_element NE lo_ctx_element.
lo_selected_element->set_selected( abap_false ).
ENDIF.
ENDLOOP.
" check if element is selected
IF lo_ctx_element->is_selected( ) EQ abap_true.
lo_ctx_element->set_selected( flag = abap_false ).
ELSE.
lo_ctx_element->set_selected( flag = abap_true ).
ENDIF.
Hope this resolves your issue.
Regards,
Rama
Hi,
Thanks for replying but my scenaio is diff, i want to select & unselect lead selection when user double click lead selection it should b unselectable....how to do it...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Syed,
To unselect a record on table, please use CTRL + click
i.e., Hold the key CTRL and click on the row which is to be reset/unselect
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use set_selected ( ) method of context element and pass value abap_false. You could check this document for reference: http://scn.sap.com/docs/DOC-28915
Regards,
Kiran
Hi Syed,
You can select multiple rows without CTRL key, also but you need to do it through program.
Please follow the below points
METHOD onactionlead_select .
DATA lo_ctx_element TYPE REF TO if_wd_context_element.
* get element via lead selection
lo_ctx_element = wdevent->get_context_element( name =
'NEW_ROW_ELEMENT' ).
IF lo_ctx_element IS NOT BOUND.
RETURN.
ENDIF.
IF lo_ctx_element->is_selected( ) EQ abap_true.
lo_ctx_element->set_selected( flag = abap_false ).
ELSE.
lo_ctx_element->set_selected( flag = abap_true ).
ENDIF.
ENDMETHOD.
Hope this resolves your issue.
Regards,
Rama
Hi Syed,
Can you please explain the issue clearly. Are you getting the first row selected in the table and you need it to be unselected by default. uncheck the the removal of Initialize lead selection in the table property. If it is done confirm whether the Selection property set to 0..1
With Regards,
Giriesh M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.