【问题标题】:Jqgrid Complex SearchJqgrid 复杂搜索
【发布时间】:2011-11-15 16:47:59
【问题描述】:

这是一个场景,我有一个 JQGrid 从服务中请求完整的数据列表,我使用了复杂的搜索,并且使用这个属性 loadonce: true;

gridview: true,
    rownumbers: true,
    rownumWidth: 20,
    scroll: 0,
    rowNum: 10,
    rowList: [10, 50, 100, 1000],
    sortname: 'ID',
    pager: '#pager',
    sortorder: "asc",
    viewrecords: true,
    autowidth: true,
    width: '100%',
    height: '100%',
    scrollOffset: 0,
    loadonce: false,
    ignoreCase: true,

如果我将 loadonce 禁用为 false,那么复杂搜索将不起作用,我真正想要的是如何搜索已加载的现有记录,假设我已加载 1000 行;我需要在内部过滤它们而不向服务器发送数据,知道吗?

额外的搜索信息

 {
        multipleSearch: true,
         multipleGroup: false, 
         showQuery: false,
         odata: ['contains', 'equal', 'not equal', 'less', 'less or equal', 'greater', 'greater or equal', 'begins with', 'does not begin with', 'is in', 'is not in', 'ends with', 'does not end with', 'does not contain'],
         groupOps: [{ op: "AND", text: "all" }, { op: "OR", text: "any"}],
         matchText: "    Find",
         rulesText: " matches",
         sopt: ['cn', 'bw', 'eq', 'ne', 'lt', 'le', 'gt', 'ge', 'ew']

 });

谢谢

【问题讨论】:

    标签: search jqgrid grid


    【解决方案1】:

    我再次在这里找到了@Oleg 的答案,谢谢 Oleg

    $('#grid').jqGrid('setGridParam', { datatype: 'json' }).trigger('reloadGrid');

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-04-22
      • 1970-01-01
      • 2020-03-19
      • 2012-08-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多