2015-02-06 56 views
0

太多的无奈之后,我终于得到了搜索图标显示在导航区域,但现在,当我点击它的屏幕将变为“莫代尔”,但没有出现搜索对话框!jqGrid的搜索过滤器弹出没有出现

这里是我的代码头部分:

这是我的网格定义

  $("#examinersGrid").jqGrid({ 
       url: baseUrl() + selectQuery(), 
       mtype: "POST", 
       ajaxGridOptions: { contentType: 'application/json; charset=utf-8' }, 
       serializeGridData: function (postData) { 
        if (postData.searchField === undefined) postData.searchField = null; 
        if (postData.searchString === undefined) postData.searchString = null; 
        if (postData.searchOper === undefined) postData.searchOper = null; 
        //if (postData.filters === undefined) postData.filters = null; 
        return JSON.stringify(postData); 
       }, 
       datatype: 'json', 
       colNames: ["Name", "Assignments"], 
       colModel: [ 
        { name: 'displayName', index: 'displayName', width: 200, }, 
        { name: 'assignments', index: 'assignments', width: 120, 
         formatter: 'integer', sorttype: 'int', align: 'right' 
        } 
       ], 
       jsonReader: { 
        root: "d.rows", 
        page: "d.page", 
        total: "d.total", 
        records: "d.records", 
        id: "examinerID" 
       }, 
       autowidth: true, 
       height: "auto", 
       rowNum: 10, 
       loadonce: false, 
       gridview: true, 
       pager: "#examinersPager", 
       search: { 
        caption: "Search...", 
        Find: "Find", 
        Reset: "Reset", 
        odata: ['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', 'contains', 'does not contain'], 
        groupOps: [{ op: "AND", text: "all" }, { op: "OR", text: "any"}], 
        matchText: " match", 
        rulesText: " rules" 
       }, 
       rowList: [10, 20, 30], 
       sortname: "displayName", 
       sortorder: "asc", 
       viewrecords: true, 
       autoencode: true, 
      }).navGrid('#examinersPager', { add:false, edit: false, del: false, refresh: false, search: true }); 

     }); 

任何想法?我在这里把我的头发撕掉!

回答

0

这很简单,真的......我不确定是什么触发了它。 解决的办法是将我的jquery.jqGrid.src.js引用全部移到 以上的插件引用。

感叹。所以这就是确保脚本引用按照正确顺序排列的旧javascript脚本。