2015-02-06 61 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腳本。