Kevin
Kevin

Reputation: 551

How to enable column reordering in SlickGird via drag/drop?

I've seen it done in the samples, but can't get it to work on my Grid.

What do I need to do in order to allow drag/drop column reordering in SlickGrid?

Thanks.

Upvotes: 1

Views: 7704

Answers (2)

rpeleg
rpeleg

Reputation: 71

Answering the comments above (@hiphip) - slickgrid comes with a bundled compatible version of jquery-ui. You need to add this as a script tag to you page e.g.

<script src="/slickgrid/lib/jquery-ui-1.8.16.custom.min.js"></script>

Upvotes: 1

user635090
user635090

Reputation: 1401

To create the grid, you should be doing something like:

grid = new Slick.Grid($("#myGrid"), data, columns, options);

options is a dictionary that you can use to change the behavior of the slickgrid. Make sure that the enableColumnReorder key is set to true:

var options = {
  enableColumnReorder: true
};

If this does not work, please do post your code so we can take a look.

Upvotes: 7

Related Questions