mergeGridColCells($(this),"AdminType");
function mergeGridColCells(grid,rowFildName)
{
var rows=grid.datagrid('getRows' );
//alert(rows.length);
//alert(rows[1][rowFildName]);
var startIndex=0;
var endIndex=0;
if(rows.length< 1)
{
return;
}
$.each(rows, function(i,row){
if(row[rowFildName]==rows[startIndex][rowFildName])
{
endIndex=i;
} else
{
grid.datagrid( 'mergeCells',{
index: startIndex,
field: rowFildName,
rowspan: endIndex -startIndex+1
});
startIndex=i;
endIndex=i;
}
});
grid.datagrid( 'mergeCells',{
index: startIndex,
field: rowFildName,
rowspan: endIndex -startIndex+1
});
}
*参数说明