ComponentOne Grid for WPF: Run-Time Interaction > Grouping Columns

Grouping Columns

You can group columns in your grid to better organize information. The GroupBy area at the top of the grid allows you to easily group columns through a simple drag-and-drop operation.

 

 

To group a column, drag-and-drop a column header onto the GroupBy area; for example, in the following image the grid is grouped by the Price column:

 

You can group multiple columns by performing a drag-and-drop operation to drag additional columns to the GroupBy area. In the following image, the grid is grouped by both the Price and In Stock columns:

 

To remove the grouping, simply click a column name in the GroupBy area and drag it onto the body of the grid:

 

 

You can prevent users from grouping particular columns at run time by setting the AllowGroupBy property to False. For more information, see Preventing a Column from Being Grouped.

You can customize the GroupBy area through the GroupByCellContentTemplate, GroupByCellsAutoLayoutPanelTemplate, GroupByCellTemplate, and GroupByTemplate templates. You can also use the GroupByColumns and GroupStyles collections to group items at design time and change grouping styles.


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