jqgrid和easyui,两方面的高手进来求指点。。
他们之间哪个的优势更大一点、更好用一点、性能好一点?到网上看来很多都说easyui的性能差,我自己觉得easyui好一点。但是好像jqgrid强大一点。但是局限性强,ea...
他们之间哪个的优势更大一点、更好用一点、性能好一点?
到网上看来很多都说easyui的性能差,我自己觉得easyui好一点。但是好像jqgrid强大一点。但是局限性强,easyui的扩展性强一点。
而且jqgrid哪个请求应答的格式规定的严格。
1.求一个jqgrid后台json回调的格式。我前后台都有数据,但是就是jqgrid的表格里面没有显示。求实例一个
2.easyui的搜索的输入框该怎么做?如何实现搜索的功能?
求各位高手,谢谢了。 展开
到网上看来很多都说easyui的性能差,我自己觉得easyui好一点。但是好像jqgrid强大一点。但是局限性强,easyui的扩展性强一点。
而且jqgrid哪个请求应答的格式规定的严格。
1.求一个jqgrid后台json回调的格式。我前后台都有数据,但是就是jqgrid的表格里面没有显示。求实例一个
2.easyui的搜索的输入框该怎么做?如何实现搜索的功能?
求各位高手,谢谢了。 展开
展开全部
1
后台向前台传的数据
{"page":1,"total":1,"records":8,"rows":[{"sn":1,"id":1,"devtypename":"台式机","nextdevsn":42,"devcodehead":"C-"},{"sn":2,"id":2,"devtypename":"笔记本","nextdevsn":1,"devcodehead":"B-"},{"sn":3,"id":3,"devtypename":"服务器","nextdevsn":6,"devcodehead":"S-"},{"sn":4,"id":4,"devtypename":"网络设备","nextdevsn":1,"devcodehead":"N-"},{"sn":5,"id":5,"devtypename":"扫描打印设备","nextdevsn":1,"devcodehead":"P-"},{"sn":6,"id":6,"devtypename":"UPS","nextdevsn":1,"devcodehead":"U-"},{"sn":7,"id":7,"devtypename":"投影仪","nextdevsn":3,"devcodehead":"Y-"},{"sn":8,"id":8,"devtypename":"其他设备","nextdevsn":16,"devcodehead":"O-"}]}
前台的格式
js:
$(function(){
jQuery("#list2").jqGrid({ url:'Devtype.do?oper=list', datatype: "json", colNames:['','id','名称', '下一个新设备的序号', '设备编号头','操作'], colModel:[ {name:'sn',index:'sn', width:20,sortable:false,align:"right",search:false}, {name:'id',index:'id', width:30,align:"right",search:false,key:true}, {name:'devtypename',index:'devtypename', width:200, editable:true,align:"center",editrules:{custom:true, custom_func:vali_devtypename}}, {name:'nextdevsn',index:'nextdevsn', width:100, editable:true, align:"right",editrules:{custom:true, custom_func:vali_nextdevsn}}, {name:'devcodehead',index:'devcodehead', width:100, editable:true, align:"center",editrules:{custom:true, custom_func:vali_devcodehead}}, {name:'act2',index:'act2', width:60,fixed:true, sortable:false, resize:false, formatter:'actions',formatoptions:{keys:false,editbutton:true,delbutton:true},align:"center"} ], rowNum:15, rowList:[10,15,20,50], pager: '#pager2', jsonReader:{ repeatitems : false }, height:"auto", width:800, strinkToFit:true, sortname: 'id', viewrecords: true, sortorder: "asc", editurl: "Devtype.do", caption:"设备类型" }); jQuery("#list2").jqGrid('navGrid',"#pager2",{search:false,edit:false,add:false,del:true}); }); html:<body ><table id="list2"></table><div id="pager2"></div> </body>
官方例子http://zhidao.baidu.com/question/438319519.html?oldq=1
官方手册http://www.trirand.com/jqgridwiki/doku.php?id=wiki:jqgriddocs
后台向前台传的数据
{"page":1,"total":1,"records":8,"rows":[{"sn":1,"id":1,"devtypename":"台式机","nextdevsn":42,"devcodehead":"C-"},{"sn":2,"id":2,"devtypename":"笔记本","nextdevsn":1,"devcodehead":"B-"},{"sn":3,"id":3,"devtypename":"服务器","nextdevsn":6,"devcodehead":"S-"},{"sn":4,"id":4,"devtypename":"网络设备","nextdevsn":1,"devcodehead":"N-"},{"sn":5,"id":5,"devtypename":"扫描打印设备","nextdevsn":1,"devcodehead":"P-"},{"sn":6,"id":6,"devtypename":"UPS","nextdevsn":1,"devcodehead":"U-"},{"sn":7,"id":7,"devtypename":"投影仪","nextdevsn":3,"devcodehead":"Y-"},{"sn":8,"id":8,"devtypename":"其他设备","nextdevsn":16,"devcodehead":"O-"}]}
前台的格式
js:
$(function(){
jQuery("#list2").jqGrid({ url:'Devtype.do?oper=list', datatype: "json", colNames:['','id','名称', '下一个新设备的序号', '设备编号头','操作'], colModel:[ {name:'sn',index:'sn', width:20,sortable:false,align:"right",search:false}, {name:'id',index:'id', width:30,align:"right",search:false,key:true}, {name:'devtypename',index:'devtypename', width:200, editable:true,align:"center",editrules:{custom:true, custom_func:vali_devtypename}}, {name:'nextdevsn',index:'nextdevsn', width:100, editable:true, align:"right",editrules:{custom:true, custom_func:vali_nextdevsn}}, {name:'devcodehead',index:'devcodehead', width:100, editable:true, align:"center",editrules:{custom:true, custom_func:vali_devcodehead}}, {name:'act2',index:'act2', width:60,fixed:true, sortable:false, resize:false, formatter:'actions',formatoptions:{keys:false,editbutton:true,delbutton:true},align:"center"} ], rowNum:15, rowList:[10,15,20,50], pager: '#pager2', jsonReader:{ repeatitems : false }, height:"auto", width:800, strinkToFit:true, sortname: 'id', viewrecords: true, sortorder: "asc", editurl: "Devtype.do", caption:"设备类型" }); jQuery("#list2").jqGrid('navGrid',"#pager2",{search:false,edit:false,add:false,del:true}); }); html:<body ><table id="list2"></table><div id="pager2"></div> </body>
官方例子http://zhidao.baidu.com/question/438319519.html?oldq=1
官方手册http://www.trirand.com/jqgridwiki/doku.php?id=wiki:jqgriddocs
追问
您的答案很好,不过在之前我已经自己研究出来了。
我想问的是他们两者之前谁更强大性能更好一点??
追答
我对easyui了解不多,以前试图使用,貌似先在服务器端生成json临时文件,js从浏览器读取这个文件以取得数据.界面不好看.
个人感觉jqgrid功能强大一些,好使!
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
ZESTRON
2024-09-04 广告
2024-09-04 广告
在Dr. O.K. Wack Chemie GmbH,我们高度重视ZESTRON的表界面分析技术。该技术通过深入研究材料表面与界面的性质,为提升产品质量与可靠性提供了有力支持。ZESTRON的表界面分析不仅涵盖了相变化、化学反应、吸附与解吸...
点击进入详情页
本回答由ZESTRON提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询