Create column groups in DataGrid

Tutorial » Create column groups in DataGrid

The easyui DataGrid has ability to group columns, as the following example shows:

In this example, we use flat data to populate the DataGrid data, and group the listprice,unitcost,addr1,status columns under a single column.

To create column groups you should defines the columns property of datagrid plugin. Each element of columns is a definition of group which can use rowspan or colspan property to combine cells together.

The following code implements above example:

Download the EasyUI example:

easyui-datagrid-demo.zip