ComponentOne Grid for WPF: Grid for WPF Appearance > Setting Row Header Visibility

Setting Row Header Visibility

Row headers appear by default on the left side of the grid and include icons for the filter and new row rows as well as an indicator for the current row. By default the row headers are visible, but you can also set the row headers to be hidden or collapsed through the RowHeaderVisibility property.

RowHeaderVisibility is set to Visible

When the RowHeaderVisibility property is set to Visible, row headers are visible on the grid. This is the default setting.

 

In XAML

You can set the RowHeaderVisibility property to Visible in the Properties window or by adding RowHeaderVisibility="Visible" to the <c1grid:C1DataGrid> tag so that it looks similar to the following:

<c1grid:C1DataGrid Name="C1DataGrid1" RowHeaderVisibility="Visible">

In Code

To explicitly set the RowHeaderVisibility property to Visible, add the following code to your project:

      Visual Basic

C1DataGrid1.RowHeaderVisibility = Windows.Visibility.Visible

      C#

c1DataGrid1.RowHeaderVisibility = Windows.Visibility.Visible;

RowHeaderVisibility is set to Hidden

When the RowHeaderVisibility property is set to Hidden, the space where the row headers should appear appears blank.

 

In XAML

You can set the RowHeaderVisibility property to Hidden in the Properties window or by adding RowHeaderVisibility="Hidden" to the <c1grid:C1DataGrid> tag so that it looks similar to the following:

<c1grid:C1DataGrid Name="C1DataGrid1" RowHeaderVisibility="Hidden">

In Code

To set the RowHeaderVisibility property to Hidden, add the following code to your project:

      Visual Basic

C1DataGrid1.RowHeaderVisibility = Windows.Visibility.Hidden

      C#

c1DataGrid1.RowHeaderVisibility = Windows.Visibility.Hidden;

RowHeaderVisibility is set to Collapsed

When the RowHeaderVisibility property is set to Collapsed, the row headers appear collapsed and not visible.

 

In XAML

You can set the RowHeaderVisibility property to Collapsed in the Properties window or by adding RowHeaderVisibility="Collapsed" to the <c1grid:C1DataGrid> tag so that it looks similar to the following:

<c1grid:C1DataGrid Name="C1DataGrid1" RowHeaderVisibility="Collapsed">

In Code

To set the RowHeaderVisibility property to Collapsed, add the following code to your project:

      Visual Basic

C1DataGrid1.RowHeaderVisibility = Windows.Visibility.Collapsed

      C#

c1DataGrid1.RowHeaderVisibility = Windows.Visibility.Collapsed;


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