Search code examples
slickgrid

Drag & drop columns into or out of the SlickGrid


I am just learning about the impressive SlickGrid library; and here's my question:

We would like to give users the ability to drag & drop columns from a list of possible columns into the grid to add columns (and possibly likewise drag & drop columns out of the grid to remove columns). Think: Outlook field chooser - where you can add/remove the To column, the From column, etc. via drag & drop.

Any chance that this might be possible? Many thanks, Dave


Solution

  • This isn't currently possible since you'd essentially have to modify SlickGrid's built-in column management code. As part of an on-going componentization of SlickGrid, that code may get moved into a separate plugin, which would make it easier to extend. In the meantime, you can extend the column picker control (included in the distro) to have two lists with columns that can be drag'n'dropped within the control itself (not onto the grid's columns).