80jqGrid - 冻结分组列

JSON(格式化后的json)

80jqGrid - 冻结分组列

HTML代码举例

<html>
  <head>
    <title>jqGrid 实例</title>
  </head>
  <body>
    ···代码省略···
    <table id="pgrid3"></table> 
    <div id="ppager3"></div>
    <a href="data.json">JSON FILE</a>
    ···代码省略···
  </body>
</html>

javascript代码举例

$(function(){
  pageInit();
});
function pageInit(){
  jQuery("#pgrid3").jqGrid('jqPivot', 
      "data.json",
      // pivot options
      {
        xDimension : [
          {
            dataName: 'CategoryName', 
            width:90
          },{
            dataName: 'ProductName'
          }
        ],
        yDimension : [
          {
            dataName: 'Country', 
            converter : function(value, xData, yData){
              return 'TotalCountry';
            }
          },{
            dataName: 'Country'
          }
        ],
        aggregates : [
          { 
            member : 'Price', 
            aggregator : 'sum', 
            width:50,
            formatter:'number',
            align:'right',
            summaryType: 'sum'
          }
        ]
      }, 
      // grid options
      {
        width: 700,
        rowNum : 10,
        pager: "#ppager3",
        caption: "Columns groups"
      });

}
			

相关文章:

  • 2022-01-08
  • 2021-07-02
  • 2021-06-27
  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2021-10-30
猜你喜欢
  • 2022-12-23
  • 2021-05-31
  • 2021-10-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案