我第一次用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
解决方案 »
- 求助:如何同时验证两个输入框必填
- 下面这段js代码为啥老是错误呢
- jquery easyinsert初始化的问题 跪求
- JS调用VB的OCX控件问题!紧急求助!!!
- HTML代码中可以用变量吗?
- 在servlet中,加入JS的alert,为什么没有提示窗口,而直接进入了response的页面。代码如下:
- 在function中,this代表哪个对象:有个资料里这样说的:
- 图像随滚动条的上下拉动而上下移动脚本
- javascript是否支持的uint64的数据类型?
- 探讨一个“数据库连接”是否放在Session里的问题。。。。
- java如何表示每周的一、三、五?
- nodejs,socket.io遇到的几个问题.总是自动断开?
jQuery("#list4").jqGrid('navGrid',"#list4pager",{edit:true,add:true,del:true,view:true});