ComponentOne Grid for WPF: Grid for WPF Task-Based Help > Customizing the Grid's Appearance > Changing Text in the GroupBy Area

Changing Text in the GroupBy Area

The GroupBy area appears at the top of the grid and allows users to group columns. By default the GroupBy area of the grid is visible and includes the text "Drag a column header here to group by that column". This text is replaced by column headers when a column is dragged into the GroupBy area. You can change this text to provide instructions or suggestions for the user with the GroupByCaption property in the C1DataGrid Properties window, through XAML, or through code.

At Design Time

For example, to change the text of the GroupBy area to be blank, navigate to the Properties window and delete the default text next to the GroupByCaption property.

In XAML

For example, to change the text of the GroupBy area to be blank in XAML add GroupByCaption="" to the <c1grid:C1DataGrid> tag so that it appears similar to the following:

<c1grid:C1DataGrid Name="c1DataGrid1" ItemsSource="{Binding Path=ProductsDataSet.Products, ElementName=Window, Mode=Default}" GroupByCaption="">

In Code

To change the text of the GroupBy area to be blank, add the following code to your project:

      Visual Basic

C1DataGrid1.GroupByCaption = ""

      C#

c1DataGrid1.GroupByCaption = "";

Run your project and observe:

The GroupBy area will appear blank:

 


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