on 07-14-2011 6:50 AM
We have 2 table and would like to drag an object from one table (cell) to another. It seems this is impossible at the moment. Dragging works if you add an icon to the first table but the DropTarget element apparently cannot be placed in a table. Why this limitation?
Hi,
A table can have both Drag Source Info and * Drag* Traget Info . Just right click on the table in edit mode to add the above said options. For Drag and drop to take take place the tag present in the Drag source info and drag target info should match.
Have a look at
Link:[Example|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b09cc9d7-5403-2d10-f6a1-8705ea280c4e?quicklink=index&overridelayout=true]
Also look at the standard component WDR_TEST_DRAG_AND_DROP.
Kindly post back if you face any issues
Regards
Karthiheyan M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
I guess you cannot determine which cell was dropped but you can identify the row that was dropped.
Also while creating the event for onDROP ,check transfer UI Event transfer parameters which will add more parametrs like DATA , ID ,WD_CONTEXT_EVENT ,tags ,mime type....
With these parameters you can surely get the row that was dropped.
Regards
Karthiheyan M
Yes, I can now get the row:
lo_drop ?= wdevent->get_object( 'ROW_ELEMENT' ).
IF lo_drop IS BOUND.
lv_i = lo_drop->get_index( ).
READ TABLE lt_lefttable INTO ls_item INDEX lv_i.
...
But the UI display is undesirable. It does not show the user the row but either above or below the row. It seems this feature is for inserting rows not for dragging and dropping...
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.