【问题标题】:jqGrid - saving the colmodel to local cachejqGrid - 将 colmodel 保存到本地缓存
【发布时间】:2012-02-21 04:19:55
【问题描述】:

我使用 setColumns 函数在客户端动态显示/隐藏列。

现在我想将选定的列保存到本地缓存。如何做到这一点。

以下是我用过的代码

$("#spsGrid").navButtonAdd('#prPager', {
  caption: "Show/Hide Columns",
  title: "Click here to select Columns to view",
  onClickButton: function() {
    var params = {width:500,modal:true,drag:true};
    jQuery("#list").setColumns(params);
  },
  position: "last"
});

现在,每当用户选择几列并单击对话框内的 ok 按钮时,我必须提取选定的列并将其保存为用户首选项。那么,我们如何将事件附加到此显示/隐藏列对话框中的 OK 按钮?

【问题讨论】:

    标签: jquery jqgrid


    【解决方案1】:

    由于 JQGrid 不直接支持 SetColoumns 插件,我使用了 ColumnChooser 选项。它解决了我的问题。

    参考此链接Is there a full working example for a jqGrid ColumnChooser?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-11-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-07
      • 2022-01-23
      • 2018-11-20
      相关资源
      最近更新 更多