ComponentOne Grid for WPF: Grid for WPF Appearance > Setting Filter Bar Visibility

Setting Filter Bar Visibility

The Filter bar allows end users to filter grid content at run time. For more information, see Filtering Columns. By default the Filter bar is visible, but you can also set the Filter bar to be hidden or collapsed through the FilterBarVisibility property.

FilterBarVisibility is set to Visible

When the FilterBarVisibility property is set to Visible, content can be filtered. This is the default setting.

 

In XAML

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

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

In Code

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

      Visual Basic

C1DataGrid1.FilterBarVisibility = Windows.Visibility.Visible

      C#

c1DataGrid1.FilterBarVisibility = Windows.Visibility.Visible;

FilterBarVisibility is set to Hidden

When the FilterBarVisibility property is set to Hidden, the space where the filter bar should appear appears blank and content cannot be filtered.

 

In XAML

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

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

In Code

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

      Visual Basic

C1DataGrid1.FilterBarVisibility = Windows.Visibility.Hidden

      C#

c1DataGrid1.FilterBarVisibility = Windows.Visibility.Hidden;

FilterBarVisibility is set to Collapsed

When the FilterBarVisibility property is set to Collapsed, the filter bar and the space where it should appear are collapsed and not visible and grid content cannot be filtered.

 

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

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

In Code

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

      Visual Basic

C1DataGrid1.FilterBarVisibility = Windows.Visibility.Collapsed

      C#

c1DataGrid1.FilterBarVisibility = Windows.Visibility.Collapsed;


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