views:

1289

answers:

1

Coolite has excellent support for Grids, and the GridPanel control has an obvious property: EnableDragDrop. But after a lengthy search through the forums and given examples, I have yet to come across a good example that demonstrates a fairly simple task: drag-and-drop rearranging of rows in a normal GridPanel.

Has anyone implemented drag-and-drop of GridPanel rows in Coolite without resorting to working directly with Ext JS?


Edit:

  • @Kheu: I have indeed tried setting EnableDragDrop="true" on a Coolite ext:GridPanel. But that is just part of the equation. Just setting EnableDragDrop="true" will give you the ability to drag rows (well, kind of; a simple "n row(s) selected" placeholder appears) but disallow you from dropping them. I’ve managed to enable drag and drop by augmenting the Coolite controls with plain ExtJS, but I am hesitant to post my work, because it seems there should be a simple solution in Coolite. There is even a good multiselect drag-and-drop example (see the "Drag/Drop (Insert Mode)" tab, but with no clear means of recreating the same functionality in GridPanels (that example uses ext:Multiselect nested within a regular ext:Panel).
A: 

Maybe you have to take a look at how rearranging columns is implemented in ExtJS (quite complicated)? And reimplement it for rows in a similar way.

Thevs