开发者

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


It isn't drag and drop, but there is a context menu in the header that allows you to check off the columns you want to show/hide. You can customize it in the slick.columnpicker.js file.


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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜