ComponentOne GridView for ASP.NET AJAX: GridView for ASP.NET AJAX Task-Based Help > Using Aggregates and Grouping > Merging Rows

Merging Rows

This topic demonstrates how to merge rows containing identical text in C1GridView.

The RowMerge property allows the selected column to merge rows with the same text. For example, all of the products below belong to various categories:

 

 

Setting the RowMerge property to Free allows the Category column to merge the rows with the same text:

 

 

Use the RowMerge property of the C1GridView class to determine if and how rows are merged:

      Visual Basic

CType(C1GridView1.Columns(1), C1.Web.UI.Controls.C1GridView.C1Field).RowMerge = C1.Web.UI.Controls.C1GridView.RowMerge.Free

      C#

((C1.Web.UI.Controls.C1GridView.C1Field)C1GridView1.Columns[1]).RowMerge = C1.Web.UI.Controls.C1GridView.RowMerge.Free;

The RowMerge property can also be accessed in the Property Builder. Simply select a column from the list of Selected columns, click the drop-down arrow next to the RowMerge property and choose Free or Restricted. The default is None.

* Sample Project Available

For the complete sample, see the Merging sample located on the ComponentOne HelpCentral Sample page.


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.