一、前台:
html代码:
<table id="chartTable" class="scroll" cellpadding="0" cellspacing="0"></table>
<div id="chartpager"></div>
js代码:
jQuery("#chartTable").jqGrid({
url : '../dashbord/getAllChart.do',
datatype : "json",
colNames : [ "ID", "视图ID", "图表类型", "标题", "Y坐标显示","X坐标显示","数据SQL","分类名称","刷新时间" ],
colModel : [ {
name : "id",
index : "id",
width : 100,
align : "center"
}, {
name : "pid",
index : "pid",
width : 100,
align : "center",
editable : true
}, {
name : "type",
index : "type",
width : 185,
editable : true,
align : "left",
edittype : "select",
editoptions : {
value : "areaChart:区域图;lineChart:折线图;columnChart:柱状图;panelChart:仪表盘;pieChart:饼图"
}
}, {
name : "title",
index : "title"

本文介绍了如何使用jqGrid进行前端表格展示,并与后台进行数据交互。前端部分展示了jqGrid的配置,包括表格列定义、编辑类型设置等。后台部分详细解释了获取查询参数、分页处理及数据编辑(增删改)的方法,涉及到Struts操作。
最低0.47元/天 解锁文章
994

被折叠的 条评论
为什么被折叠?



