Original http://www.cnblogs.com/szytwo/archive/2012/09/18/2691420.html
$ ('# Day_health' ). DataGrid ({URL: "Sqb_bweb_day_health.aspx? Mode = day_health" , Pagination: True , Total: 2000 , Pagesize: 10 , Pagelist :[ 10, 20, 30, 40, 50, 60, 70, 80, 90,100 ], Rownumbers: True , Fit: True , // Automatic size Fitcolumns: True , // Adaptive column width Singleselect: True , // Single choice? Idfield: 'Project _ id' , Columns: [[{Title: 'Group', colspan: 3 }, {Field: 'Opt', Title: 'operation', width: 100, align: 'center', rowspan: 2, Formatter: Function (Value, REC ){ Return '<Span style = "color: Red"> edit Delete </span>' ;}}, {Title: 'Group 2 ', colspan: 3 }], [{Field: 'Name', Title: 'name', width: 120, rowspan: 1 }, {Field: 'Addr ', Title: 'address', width: 220, rowspan: 1, sortable: True , Sorter: Function (A, B ){ Return (A> B? 1:-1 ) ;}}, {Field: 'Col4', Title: 'col41', width: 150, rowspan: 1 }, {Field: 'Name1', Title: 'name1', width: 120, rowspan: 1 }, {Field: 'Addr1', Title: 'address1', width: 220, rowspan: 1, sortable: True , Sorter: Function (A, B ){ Return (A> B? 1:-1 ) ;}}, {Field: 'Col41', Title: 'col411', width: 150, rowspan: 1 }]});
$ ('# Day_health' ). DataGrid ({URL: "Sqb_bweb_day_health.aspx? Mode = day_health" , Pagination: True , Total: 2000 , Pagesize: 10 , Pagelist :[ 10, 20, 30, 40, 50, 60, 70, 80, 90,100 ], Rownumbers: True , Fit: True , // Automatic size Fitcolumns: True , // Adaptive column width Singleselect: True , // Single choice? Idfield: 'Project _ id' , Columns: [[{Title: 'Group', colspan: 3 }, {Field: 'Opt', Title: 'operation', width: 100, align: 'center', rowspan: 2 , Formatter: Function (Value, REC ){ Return '<Span style = "color: Red"> edit Delete </span>' ;}}, {Title: 'Group 2 ', colspan: 3 }], [{Field: 'Name', Title: 'name', width: 120, rowspan: 1 }, {Field: 'Addr ', Title: 'address', width: 220, rowspan: 1, sortable: True , Sorter: Function (A, B ){ Return (A> B? 1:-1 ) ;}}, {Field: 'Col4', Title: 'col41', width: 150, rowspan: 1 }, {Field: 'Name1', Title: 'name1', width: 120, rowspan: 1 }, {Field: 'Addr1', Title: 'address1', width: 220, rowspan: 1, sortable: True , Sorter: Function (A, B ){ Return (A> B? 1:-1 ) ;}}, {Field: 'Col41', Title: 'col411', width: 150, rowspan: 1 }]});