Version

Enabling Cell Merging

Purpose

This topic demonstrates, with code examples, how to enable the Cell Merging feature of the WebDataGrid™.

Required background

The following table lists the materials required as a prerequisite to understanding this topic.

Topic Purpose

This topic explains, with code examples, how to enable sorting for the users of the WebDataGrid .

This topic provides an overview of the Cell Merging feature of the WebDataGrid .

Enabling Cell Merging

Overview

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.

Property settings

The following table maps the desired Enable Cell Merging to property settings.

In order to: Use this property: And set it to:

Enable Cell Merging

true

Code Examples

Description

The following code snippets demonstrate how to enable Cell Merging with server-side and with client-side rendering.

Code example: enabling Cell Merging with server-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;

Code example: enabling Cell Merging with client-side rendering

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;

Samples

The following samples provide additional information related to this topic.

Sample Purpose

This sample demonstrates the cell merging capabilities of the sorting behavior of the WebDataGrid.