How can i do drag from cl_column_tree_mode drop to cl_gui_alv_grid ???
Hi,
I have building a program that will have one split screen and one of them has cl_column_tree_mode at top, and the other has cl_gui_alv_grid at bottom.
I can Drag And Drop Lines From ALV GRID to TREE and i can use ONDRAG event of ALVGRID, DROP event of TREE Control and ONDROPCOMPLETE event of ALVGRID.
But when i try to reverse it as like that Drag From TREE to ALVGRID, just DRAG event of TREE is triggering.
I have implemented end registered ONDROP event for ALVGRID but it is no triggering.
Have i something which missed ? Some of code at the above.
*****************CODE****************************************
*I created Application Ocject, Custom Container and Spliiter in here
** Definition of drag drop behaviour
create object behaviour_top.
call method behaviour_top->add
exporting
flavor = 'LINEFROM' "I dont know where i can use this
dragsrc = 'X'
droptarget = 'X'
effect = cl_dragdrop=>move.
call method behaviour_top->add
exporting
flavor = 'LINETO' "I dont know where i can use this
dragsrc = 'X'
droptarget = 'X'
effect = cl_dragdrop=>move.
call method behaviour_top->get_handle
importing handle = handle_top. "I am not sure that i can use this handle for both TREE Nodes and ALV Rows, But i am using it for both.
****************************** TREE ********************************
* CREATE TREE
ls_treemhhdr-heading = 'Nakliye ve Makaralar'.
ls_treemhhdr-width = 35.
create object gref_column_tree
exporting
node_selection_mode = cl_column_tree_model=>node_sel_mode_single
item_selection = space
hierarchy_column_name = 'NUMBER'
hierarchy_header = ls_treemhhdr.
call method gref_column_tree->create_tree_control
exporting
parent = container_1 .
* Events for tree control
set handler g_application->handle_tree_drag for gref_column_tree.
set handler g_application->handle_tree_drop for gref_column_tree.
* Build TREE
perform build_tree using gref_column_tree. "I use HANDLE_TOP in this when creating nodes.
****************************** TREE ********************************
**************************** ALV GRID ********************************
* create ALV Grid
create object alv_grid
exporting i_parent = container_2.
* Events alv control
set handler g_application->handle_alv_drag for alv_grid.
set handler g_application->handle_alv_drop for alv_grid.
set handler g_application->handle_alv_drop_complete for alv_grid.
gs_layout-grid_title = 'İs Listesi'.
gs_layout-s_dragdrop-row_ddid = handle_top. "I think this is a important thing
call method alv_grid->set_table_for_first_display
exporting is_layout = gs_layout
changing it_fieldcatalog = gt_fieldcat
it_outtab = i_tabout[].
**************************** ALV GRID ********************************
*I have implemented all methods for this class, it hink its not important to see *which code its has, important is why its not triggering.
class lcl_application definition.
public section.
data: next_node_key type i.
methods:
* ALV EVENTS
handle_alv_drag for event ondrag of cl_gui_alv_grid
importing e_row e_column e_dragdropobj,
handle_alv_drop for event ondrop of cl_gui_alv_grid
importing e_row e_column es_row_no e_dragdropobj,
handle_alv_drop_complete for event ondropcomplete of cl_gui_alv_grid
importing e_row e_column e_dragdropobj,
* TREE EVENTS
handle_tree_drag for event drag of cl_column_tree_model
importing node_key item_name drag_drop_object,
handle_tree_drop for event drop of cl_column_tree_model
importing node_key drag_drop_object,
handle_tree_drop_complete for event drop_complete of cl_column_tree_model
importing node_key ITEM_NAME drag_drop_object.
endclass.
Thanks kaipha,
in examples in SE83 i have noticed that i have to create an inctance for drag drop object when drag starts.
method handle_tree_drag.
data: "local_node_table type node_table_type,
new_node type mtreesnode,
dataobj type ref to lcl_dragdropobj_from_tree,
l_keytxt(30) type c.
catch system-exceptions move_cast_error = 1.
* create and fill dataobject for events ONDROP and ONDROPCOMPLETE
create object dataobj. "When i create dataobj in here
move node_key to dataobj->node_key.
drag_drop_object->object = dataobj. "And when i call this method, ALV Drop event has begin triggered
endcatch.
if sy-subrc <> 0.
call method drag_drop_object->abort.
endif.
endmethod.
Similar Messages
-
In Mail 3.6 how can I delete address from the drop down menu?
When I update an email address in the Address Book, the drop down menu in a new email is still the old address.
I think I figured it out. I have to click on the arrow beside the smart address in a new email and delete it there. I tried removing previous recipients but without success. I'm not sure what the name of my software is. Maybe snow leopard. How can I find that?
Thanks for the suggestion and it probably helped a lot of other users and would have helped me if I knew the software. -
When I delete a name from Address Book it is not removed from the name drop down list when forwarding a message. How can I remove it from the drop down list?
In Mail go to the Window Menu and select Previous Recipients. Deleting entries from there won't delete them from your Address Book.
-
I wanted to put a file via a drag and drop into applications on my finder sidebar. it missed and landed in the sidebar itself. i can not remove it. i can not even highlight it. how can i remove it from the sidebar.
Try holding down the Command key and dragging the file well off the sidebar.
Hope this helps. -
How can I remove icons from the Finder sidebar? Transferred info from my Mac Pro desktop computer (using target mode) and there were folder icons on the Mac Pro Finder sidebar that are now on the MacBook Finder sidebar, even though these folders do not exist on the MacBook. Tried to drag them off, which is the usual way to get rid of folders that the user adds to the sidebar (as opposed to those that can be added via the Customize Toolbar dropdown menu) but was unsuccessful. I then unchecked all of the Customize Toolbar menu items and the folder icons still remained. What else can I do?
Did you hold the Command (Apple) key while dragging them off the sidebar? That usually makes them go *poof*.
-
How can you transfer files from drop box to ibooks?
How can you transfer files from drop box to ibooks?
These two articles should help:
http://docs.info.apple.com/article.html?path=Mac/10.7/en/mchlp2185.html
http://support.apple.com/kb/HT2518 -
My calendar events are dropped after the month is over. How can I prevent this from happening?
Settings > Mail, Contacts, Calendars > [scroll way down to the Calendars section] Sync = "All events"
-
How can I transfer files from one external HD (WD My Passport 2T) to another external HD (Seagate Backup Plus 2T)? WD drive was improperly ejected (although we did tell it to eject) and now Finder no longer recognizes it. Using MacBook Pro and I just upgraded to Yosemite before this happened. Was told at Apple Store to use Disk Utility to repartition, but it failed. It says to backup files and restore. But how do I backup files? Or would appreciate any other suggestions to repair drive.
You may drag & drop between external hds.
Should you run into trouble.
Take the exernal drive appart. Take out the harddrive. Try reading the data via a usb adapter. Put a household finan on the hd.
http://www.cablewholesale.com/products/usb-firewire/usb-2.0-products/product-40u 2-01000.php?utm_source=Nextag&utm_medium=cpc&zmam=54972865&zmas=1&zmac=4&zmap=4 4 77 -
How can i transfer photos from my macbook to a regular USB
how can i transfer photos from my macbook to regular USB plugged in it
For a few photos, you can select them in the iPhoto library then drag and drop them to the USB key. This is a copy, so the originals will remain in iPhoto.
To move the whole library, use the procedure described here:
http://support.apple.com/kb/ht1229
NOTE: When you post questions concerning just about anything on a Mac, it is essential to include information about the version of Mac OS that you are running. The latest - what you have, is OS 10.9.1. -
How can I move photos from my shutter fly account to my iPhoto?
How can I move photos from my shutter fly account to my iPhoto?
You need to ask ShutterFly support
I would think that you can select multiple photos and drag them to then desktop and drop them - but that's jsut a guess
LNB -
How can I transfer movies from the movie folder on my macbook pro to a wirless HD in my home network. I cannot drag/drop, or copy/paste as the paste command is greyed out when I attempt to paste....13" macbookpro, OSX Lion 10.7.5
any help would be appreciated !!Drag the file from your Movies folder to the wireless hard drive icon on your desktop.
-
How can I move photos from pictures to my external hard drive? I have copied all photos, however it won't allow me to paste the photos. The paste button is grayed out.
Do you want to copy some pictures to the external drive, or do you want to move your whole iPhoto library? The latter will free up hard drive space on your start up disk; the procedure is explained here:
http://support.apple.com/kb/PH2506
Note this is not the same as a Time Machine backup.
If on the other hand you want to copy some photos from one drive to another, you can just drag and drop them from one location to another. This is a true copy, the originals will remain intact. -
How can I move photos from iPhoto to Finder
How can I move photos from iPhoto to Finder?
It is better to export (file menu ==> export) since when you export you control exactly what you get - see the user tip on exporting for details
When you drag and drop you get the current preview with limited Metadata
LN -
How can i copy songs from another library to my itunes library with homesharing?
How can i copy songs from another library to my itunes library with homesharing? I see the other libraries, but cannot drag the songs into my library. The help window says to use the "show menu" at the bottom, but I don't have that menu with itunes 11.
You can do this in 2 ways.
1) You can enable the sidebar and you can drag and drop like you used to be able to. To turn on Sidebar in iTunes 11, go to View > Show Sidebar
2) Another way is to connect to your Home Share from the drop-down menu from the left (where it says Music) and select your Home Share. Once you are connected to your Home Share, select Music and you should see a button that says "All Items" and on the right, you should see the Import button. To copy, select the songs you want to import and then click on Import. -
How can I copy pictures from my computer to my SX50 so I can show them from the camera?
How can I copy pictures from my computer to my SX50 so I can show them from the camera?
I know this is an older thread, but FWIW you should be able to open up My Computer in Windows, locate your memory card there, then either drag and drop and/or copy and paste images from your computer's hard drive onto the memory card.
Maybe you are looking for
-
I have a problem with my iphone5. I don't have signal, but I can check my email, facebook... The operator is identified but I can't call
-
Hi, Please help me with this as the phone is currently lying as a dead paperwieght with my brother in law. The phone, even though bought as SIM FREE, keeps asking for ACTIVATION!!! Does it mean that I need to activate it with a SIM of one of the carr
-
Delivery Address in Purchase order
Hello Expert Delivery address on purchase order. I am trying to make changes in Delivery address tab at item level for Intercompany purchase order but the changes are not reflected in print preiview. But the same changes I am trying to make in deliv
-
MIR7 preliminary posting - Entry date continuity after posting
Hi All, Is anybody has experice regarding the following issue? in MIR7 preliminary incoming invoice is created. E.g. Entry date (CPUDT) 20/02/2009. When the we post preliminary invoice, system updates CPUDT with the actual date, by this we lose conti
-
Cada vez que abro una página web me aparece el siguiente mensaje: Exc in ev handl: Error: Bad NPObject as private data! ¿cómo puede arreglarlo?