1、当datagrid 的onLoadSuccess方法中
datagrid({onLoadSuccess:function(data){
var result = data.rows;
for(var i=0; i<result.length; i++){
var row = result[i] ;
if(row.rowspan >1){
$('#productGrid').datagrid('mergeCells',{
index:i,
field:'cpName',
rowspan:row.rowspan
});
$('#productGrid').datagrid('mergeCells',{
index:i,
field:'cpId',
rowspan:row.rowspan
});
$('#productGrid').datagrid('mergeCells',{
index:i,
field:'cpLogo',
rowspan:row.rowspan
});
i= i+row.rowspan;
}
if(row.pricePkgId == undefined || row.pricePkgId == null) {
$(".datagrid-row[datagrid-row-index=" + i + "] input[type='checkbox']")[0].disabled = true;
}
}
}})