Setting Header Visibility
By default the column headers are visible, but you can also set the column headers to be hidden or collapsed through the HeaderVisibility property.
HeaderVisibility is set to Visible
When the HeaderVisibility property is set to Visible, columns can be filtered and reordered via the column headers. This is the default setting.
In XAML
You can set the HeaderVisibility property to Visible in the Properties window or by adding HeaderVisibility="Visible" to the <c1grid:C1DataGrid> tag so that it looks similar to the following:
<c1grid:C1DataGrid Name="C1DataGrid1" HeaderVisibility="Visible">
In Code
To explicitly set the HeaderVisibility property to Visible, add the following code to your project:
C1DataGrid1.HeaderVisibility = Windows.Visibility.Visible
• C#
c1DataGrid1.HeaderVisibility = Windows.Visibility.Visible;
HeaderVisibility is set to Hidden
When the HeaderVisibility property is set to Hidden, the space where the column headers should appear appears blank.
In XAML
You can set the HeaderVisibility property to Hidden in the Properties window or by adding HeaderVisibility="Hidden" to the <c1grid:C1DataGrid> tag so that it looks similar to the following:
<c1grid:C1DataGrid Name="C1DataGrid1" HeaderVisibility="Hidden">
In Code
To set the HeaderVisibility property to Hidden, add the following code to your project:
C1DataGrid1.HeaderVisibility = Windows.Visibility.Hidden
• C#
c1DataGrid1.HeaderVisibility = Windows.Visibility.Hidden;
HeaderVisibility is set to Collapsed
When the HeaderVisibility property is set to Collapsed, the column headers appear collapsed and not visible and columns cannot be sorted and re-ordered.
In XAML
You can set the HeaderVisibility property to Collapsed in the Properties window or by adding HeaderVisibility="Collapsed" to the <c1grid:C1DataGrid> tag so that it looks similar to the following:
<c1grid:C1DataGrid Name="C1DataGrid1" HeaderVisibility="Collapsed">
In Code
To set the HeaderVisibility property to Collapsed, add the following code to your project:
C1DataGrid1.HeaderVisibility = Windows.Visibility.Collapsed
• C#
c1DataGrid1.HeaderVisibility = Windows.Visibility.Collapsed;
|