通过php / PDO加载~6K行。搜索按钮出现在导航工具栏中,但在单击时不执行任何操作。
包括:
<link href="//ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/jquery-ui.css" type="text/css" rel="stylesheet" />
<link href="//cdn.jsdelivr.net/jqgrid/4.6.0/css/ui.jqgrid.css" type="text/css" rel="stylesheet"/>
<link href="//cdn.jsdelivr.net/jqgrid/4.6.0/plugins/searchFilter.css" rel="stylesheet" type="text/css">
<link href="//cdnjs.cloudflare.com/ajax/libs/jqgrid/4.6.0/plugins/ui.multiselect.css" rel="stylesheet" type="text/css"/>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jqgrid/4.6.0/plugins/ui.multiselect.js"></script>
<script src="//cdn.jsdelivr.net/jqgrid/4.6.0/i18n/grid.locale-en.js" ></script>
<script src="//cdn.jsdelivr.net/jqgrid/4.6.0/jquery.jqGrid.src.js"></script>
<script src="//cdn.jsdelivr.net/jqgrid/4.6.0/plugins/grid.addons.js"></script>
<script src="//cdn.jsdelivr.net/jqgrid/4.6.0/plugins/grid.postext.js"></script>
<script src="//cdn.jsdelivr.net/jqgrid/4.6.0/plugins/grid.setcolumns.js"></script>
<script src="//cdn.jsdelivr.net/jqgrid/4.6.0/plugins/jquery.contextmenu.js"></script>
<script src="//cdn.jsdelivr.net/jqgrid/4.6.0/plugins/jquery.searchFilter.js"></script>
网格定义为:
var grid = $("#list2");
grid.jqGrid({
url: "loadIssues.php",
datatype: "json",
colModel: [
...
],
pager: "#pager2",
viewrecords: true,
sortorder: "desc",
gridview: true,
autoencode: true,
ignoreCase : true,
loadonce : true,
width: 800,
height: "auto",
shrinkToFit: true,
search: true,
jsonReader: {
repeatitems: false,
root: "rows"
},
接下来是:
grid.jqGrid('navGrid','#pager2',{add:false,edit:false,del:false,search:true,refresh:false},
{},{},{}, {multipleSearch:true,overlay:false});
grid.searchGrid( {multipleSearch:true,overlay:false} );
Chrome调试器未显示任何错误。
我错过了哪些步骤?
答案 0 :(得分:1)
plugins/searchFilter.css
,plugins/jquery.searchFilter.js
。它已被弃用的旧灼热组件。../jqueryui/1/themes/smoothness/jquery-ui.css
。可能应该是../jqueryui/1.11.1/themes/smoothness/jquery-ui.css
。search: true
选项也可能是错误的,但它并不重要。root: "rows"
jsonReader
属性是默认属性,可以删除。同样,shrinkToFit: true
选项也是默认选项(请参阅the documentation中描述的选项表中的列&#34;默认&#34;)并且可以删除。
醇>