<ig:WebDataGrid ID="WebDataGrid1"
runat="server">
<Behaviors>
<ig:Sorting Enabled="true" EnableCellMerging="true">
</ig:Sorting>
</Behaviors>
</ig:WebDataGrid>
This topic demonstrates, with code examples, how to enable the Cell Merging feature of the WebDataGrid™.
The following table lists the materials required as a prerequisite to understanding this topic.
By default, Cell Merging is disabled. To enable it, you need to have the sorting behavior enabled and set the EnableCellMerging property to true . By default, Cell Merging is handled on the server side. If you don’t want to make requests to the server, you can render Cell Merging on the client side.
The following table maps the desired Enable Cell Merging to property settings.
The following code snippets demonstrate how to enable Cell Merging with server-side and with client-side rendering.
In ASPX:
<ig:WebDataGrid ID="WebDataGrid1"
runat="server">
<Behaviors>
<ig:Sorting Enabled="true" EnableCellMerging="true">
</ig:Sorting>
</Behaviors>
</ig:WebDataGrid>
In C#:
this.WebDataGrid1.Behaviors.Sorting.EnableCellMerging = true;
In ASPX:
<ig:WebDataGrid ID="WebDataGrid1"
runat="server" EnableClientRendering="true">
<Behaviors>
<ig:Sorting Enabled="true" EnableCellMerging="true">
</ig:Sorting>
</Behaviors>
</ig:WebDataGrid>
In C#:
this.WebDataGrid1.EnableClientRendering = true;
this.WebDataGrid1.Behaviors.Sorting.EnableCellMerging = true;
The following samples provide additional information related to this topic.