Reputation: 27931
jqgrid doc in here contains:
method allow to reorder the grid columns using the mouse. The only necessary setting in this case is to set the sortable option in jqGrid to true.
I have sortable: true but columns cannot reordered by dragging headers by mouse. How to re-order columns by dragging columns headers or other way without using column chooser ?
Upvotes: 1
Views: 11429
Reputation: 221997
To implement sortable columns is really easy. You should just follow the documentation. You should just
jquery-ui.min.js
additionally to jquery-ui.css
which are always required. The most people have the file already included because of usage jQuery UI Widgets like Datepicker, Autocomplete, Tabs and so on.sortable: true
option to the grid.Now you can already (see the demo) drag the column header and drop it on another position.
Upvotes: 6