我第一次用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
然后看了很多人的博客 还有用法
然后界面出来是这样的,没有查询,删除这些按钮的我代码是这样的
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
解决方案 »
- 谁能告诉我怎么在JSP页面上加载华表
- 求助 在线等
- <input type='file' />获取值的问题
- JS类似股票看盘的效果
- 用JavaScript动态地修改一个input值时的onchange问题
- 关于一个Table的问题?
- 求火狐关闭页面js
- 为什么我的音乐连播最多只能是13首???
- 如何点击图片时,弹出一个只有关闭按纽的窗口,窗口中是一个图片,窗口大小和图片一样大
- 为什么alert(document.getElementById("XXX").style.opacity)弹出来的对话框上什么也没有?
- java如何表示每周的一、三、五?
- nodejs,socket.io遇到的几个问题.总是自动断开?
jQuery("#list4").jqGrid('navGrid',"#list4pager",{edit:true,add:true,del:true,view:true});