我第一次用jqgrid
然后看了很多人的博客 还有用法
然后界面出来是这样的,没有查询,删除这些按钮的我代码是这样的
navGrid('#list4pager', {edit:true, add:true,del:true,search: true });
这里我已经都设置为true了
$("#list4").jqGrid({
  url: "servlet/jsondb",
  datatype : "json",
  height : 250,
  colNames : [ '编号','姓名','日期', '地点', '精度', '纬度', '描述', '备注'],
  autowidth : false,//自动设置宽度
  rownumbers:true,
  closeAfterSearch:true,
  colModel : [{name: "ID",index : "ID", sorttype : "int",width : 60,  editable : true, search : true},
   {name: "xm",index : "xm",sorttype : "text", width : 100,  editable :true,  search : true}, 
    {name: "rq",index : "rq", sorttype : "date", width : 100, editable :true, search : true}, 
      {name: "dd",index : "dd",sorttype : "text",width : 150,editable :true,search : true} ,
    {name : "jd",index : "jd",sorttype : "float",width : 80,editable :true,search : true},
  {name : "wd",index : "wd",sorttype : "float",width : 80, editable :true,search : true},
  {name : "ms",index : "ms",sorttype : "text",width : 150,editable :true,search : true},
  { name : "bz", index : "bz", sorttype : "text", width : 150,editable :true,search : true}
  ],
  sortname : "ID",
  sortorder : "asc",
  viewrecords : true,
  rowNum : 10,
  rowList : [ 10, 20, 30],
  jsonReader : {
   repeatitems : false
  },
  pager : '#list4pager',
  caption : "列表"
 }).navGrid('#list4pager', {edit:true, add:true,del:true,search: true });
 
 
}  );
<table id="list4" class="scroll" cellpadding="0" cellspacing="0"></table>
<div id="list4pager" class="scroll"></div>jspjqgrid js jqueryjspjqgridjsjquery