Merge Cells for DataGrid
Cells in DataGrid body can be merged.
Product
Item ID
List Price
Unit Cost
Attribute
Status
源代码
Merge Cells for DataGrid - jQuery EasyUI DemoMerge Cells for DataGrid
Cells in DataGrid body can be merged.
data-options="
rownumbers: true,
singleSelect: true,
iconCls: 'icon-save',
url: 'datagrid_data1.json',
method: 'get',
onLoadSuccess: onLoadSuccess
">
ProductItem IDList PriceUnit CostAttributeStatus
function onLoadSuccess(data){
var merges = [{
index: 2,
rowspan: 2
},{
index: 5,
rowspan: 2
},{
index: 7,
rowspan: 2
}];
for(var i=0; i
$(this).datagrid('mergeCells',{
index: merges[i].index,
field: 'productid',
rowspan: merges[i].rowspan
});
}
}