Merge DataGrid Cells

Tutorial » Merge DataGrid Cells

Merging serveral cells of datagrid is frequently necessary. This tutorial will show you how to merge cells in datagrid.

To merge your datagrid cells, simply call the 'mergeCells' method and pass merge information parameter that tells datagrid how to merge your cells. Everything in the merging cells, except for the first cell, will be hidden when the cells are merged.

Create DataGrid

Merge Cells

When data loaded, we merge some cells in datagrid, so put the following code in onLoadSuccess callback function.

Download the EasyUI example:

easyui-datagrid-demo.zip