jqGrid 实例
···代码省略···
JSON FILE
···代码省略···
javascript代码举例
$(function(){
pageInit();
});
function pageInit(){
jQuery("#grid").jqGrid('jqPivot',
"data.json",
// pivot options
{
xDimension : [{dataName: 'CategoryName'} ],
yDimension : [],
aggregates : [
{
member : 'Price',
aggregator : 'sum',
width:80,
label:'Sum Price',
formatter:'number',
align:'right'
}
]
},
// grid options
{
width: 700,
rowNum : 150,
pager: "#pager",
caption: "Amounts of each product category"
});
}