自定义列选择器,如何在保存时更新网格

Custom ColumnChooser, how to update grid on saving

我正在为 jqgrid 创建自定义列选择器。在选择列并保存时,我得到一组列作为选定列。

如何手动更新包含选定列的网格?谢谢。

非常简单:

  • 您需要对 showing/hiding 列
  • 使用 showHideCol 方法(或 showColhideCol
  • 您应该使用 remapColumnsByName 方法(或旧的 remapColumns)来更改列的顺序。参见 the demo from and the demo from