首页 > 代码库 > datagrid加分组后的效果

datagrid加分组后的效果

技术分享

html

  

<table id="dg"></table>

 

js

  

$(‘#dg‘).propertygrid({                title: ‘‘,                showGroup: "false",                groupField: "monitoring_point_type",                url: ‘/GIS/Map.aspx?GetMonitoringPoints=1‘,                columns: [[                    { field: ‘monitoring_point_name‘, title: ‘名称‘, width: 100 },                     { field: ‘value‘, title: ‘名称‘, width: 100,hidden:true }                ]],                onl oadSuccess: function (data) {                    loadMnUpToDateImg("" + data.rows[0].monitoring_point_mn + "");                    points = data.rows;                    addMarker(points);                },                groupFormatter: function (val) {                    return mnType[val];                },                onClickRow: function (rowIndex, rowData) {                    var gpsPoint = new BMap.Point(rowData.monitoring_point_longitude, rowData.monitoring_point_latitude);                    map.centerAndZoom(gpsPoint, 18);                    loadMnUpToDateImg("" + rowData.monitoring_point_mn + "");                }        });

 

datagrid加分组后的效果