Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jqGrid不显示搜索按钮_Javascript_Jquery Ui_Jqgrid - Fatal编程技术网

Javascript jqGrid不显示搜索按钮

Javascript jqGrid不显示搜索按钮,javascript,jquery-ui,jqgrid,Javascript,Jquery Ui,Jqgrid,我使用jqGrid来显示我的数据,但它不显示搜索按钮。为什么呢?代码如下 $("#grdOpenItems").jqGrid({ url: 'api/matchingservicewebapi/GetAllMatchItemForClient', datatype: 'json', mtype: 'GET', caption: 'Open Items', jsonReader: { root: "rows", repeatitems: false, id : "0"},

我使用jqGrid来显示我的数据,但它不显示搜索按钮。为什么呢?代码如下

$("#grdOpenItems").jqGrid({
  url: 'api/matchingservicewebapi/GetAllMatchItemForClient',
  datatype: 'json',
  mtype: 'GET',
  caption: 'Open Items',
  jsonReader: { root: "rows", repeatitems: false, id : "0"},
  colNames: ['Id', 'Account', 'Amount', 'Ref'],
  colModel: [
    { name: 'Amount', index: 'Amount', width: 200 },
    { name: 'Account', index: 'Account', width: 300 },
    { name: 'Amount', index: 'Amount', width: 300 },
    { name: 'Ref', index: 'Ref', width: 300 }
  ],
  rowNum: 5,
  rowList: [5, 10, 15],
  multiselect: true,
  pager: '#pagerOpenItems',
  viewrecoreds: true,
  sortname: 'Id',
  sortorder: "desc",
  imgpath: 'Themes/images'
}).navGrid(pager, {
  edit: true, add: true, del: true, refresh: true, search: true,
  searchtext: "Search" });
但它显示带有图像的页面导航按钮,但不显示搜索和重新加载按钮。

一个问题:

viewrecoreds: true
应该是

viewrecords: true
我不相信jqGrid中的搜索功能是神奇的,这意味着您必须连接实际的搜索代码。看看

相关问题(S):并考虑一些要点。