PDA

View Full Version : [ HOW-TO ] Drag a grid item into an other grid item



Tchinkatchuk
21 May 2014, 4:29 AM
Hello everyone,

I use lots of drag and drop between grids and it works well.

Now I need to drag items (children) and drop them in grid item (parent). It has to be dropped in the grid item and not in the grid between items.

It should works as if the parent item is a tree item.

I do not have a clue and can't find any answer.

Thanks for anyone having a clue for this implementation.

Sylvain

israelroldan
26 May 2014, 3:38 AM
Have you explored using a treegrid? http://docs.sencha.com/extjs/4.2.2/extjs-build/examples/build/KitchenSink/ext-theme-neptune/#tree-grid

Tchinkatchuk
27 May 2014, 1:07 AM
Thx israelroldan but I really want to use my grid and not a tree grid.Can't find a way to do a DropZone

israelroldan
27 May 2014, 1:14 AM
But what does this component should look like? If you drop an item inside another, how would you want this to be rendered? That plays a big role on defining what the solution for this could be.

Tchinkatchuk
27 May 2014, 4:47 AM
It should be very simple.
I have two grids (left on right). I should be able to drag an element from the left grid and drop it into a right grid element -- not after/before but into.
When dropped, I'll manage the record and just display a notice. Nothing else visually. This should not be a tree.