且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何通过拖动列标题重新排序jqgrid中的列

更新时间:2023-11-24 16:17:46

实现可排序的列确实很容易.您只需遵循文档.你应该

To implement sortable columns is really easy. You should just follow the documentation. You should just

    总是需要
  1. 除了jquery-ui.css之外还包括jquery-ui.min.js.大多数人已经因为使用jQuery UI小部件(如Datepicker,自动完成,标签等)而包含了该文件.
  2. 在网格中添加sortable: true选项.
  1. include 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.
  2. add sortable: true option to the grid.

现在您可以(请参见演示)将列标题拖放到另一个位置.

Now you can already (see the demo) drag the column header and drop it on another position.