PDA

View Full Version : Tree to Grid Drag'n Drop



Frederes
2 Sep 2009, 5:19 AM
Hello,

I am trying to make a Tree to Grid Drag'n Drop...
Is this possible ?
Any help is welcome since i am a beginner in Ext...:">
Thank you for all,

Best,

Fred

8 Sep 2009, 4:01 AM
Hi,

Yes it is absolutely possible.

To do this, you need to setup a dropzone (or droptarget) on the grid panel that uses the same drag and drop group as the tree. You will need to override either notifydrop or oncontainerdrop on the dropzone or drop target.

I cover the world of drag and drop in chapters 11 and 12 of my book.

Frederes
8 Sep 2009, 4:10 AM
Hi,

I cover the world of drag and drop in chapters 11 and 12 of my book.

Thanks ! I am waiting for it to be delivered ;) hope it will solve my problem
EXT JS is really very good work.
Regards

Shasta
13 Jan 2010, 4:08 PM
I have a tree & grid that I'm trying to implement drag and drop

I can do...
tree 2 tree
grid 2 grid
grid 2 tree

but I'm having problems with tree 2 grid as I can't figure out how to get a handle to the grid row for the drop target in my implementation of notifyDrop(dd,e,data)

for grid 2 grid: I invoke dd.getDragData(e).rowIndex to get the index of the drop target row

But this doesn't work when the source is the tree.

Anyone know how to get the row index for tree 2 grid??

Thanks

Thomas Triplet
13 May 2010, 7:27 AM
Hi,

Yes it is absolutely possible.

To do this, you need to setup a dropzone (or droptarget) on the grid panel that uses the same drag and drop group as the tree. You will need to override either notifydrop or oncontainerdrop on the dropzone or drop target.

I cover the world of drag and drop in chapters 11 and 12 of my book.

I managed to have the tree2grid drag 'n drop, but I'd like to prevent users from reordering items in the tree and DDing stuff from the grid to the tree. The problem is that both the tree and the grid are in the DD group.... Is there a way to get around this?
Thanks