一、前台:
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"