Edit this page

Filter Descriptors

The RadDataFilter exposes a FilterDescriptors collection, which contains the FilterDescriptor objects which represent the user's filtering criteria, made via the UI. You can use this collection to either get the currently available FilterDescriptor objects or to predefine the default filtering criteria.

An example of the first scenario can be seen in the Unbound Mode topic, where the FilterDescriptors collection of the RadDataFilter gets synchronized with the FilterDescriptors collection of the RadGridView.

If you want to predefine descriptors, you have to create the desired ones and add them to the FilterDescriptors collection after you set the Source of the RadDataFilter.

Changing the Source of the RadDataFilter will clear the FilterDescriptors collection.

Here is an example of a predefined descriptor.

XAML

<telerik:RadDataFilter x:Name="radDataFilter" />

C#

this.radDataFilter.Source = SampleData.GetEmployees();
this.radDataFilter.FilterDescriptors.Add( new FilterDescriptor( "Name", FilterOperator.Contains, "m" ) );

VB.NET

Me.radDataFilter.Source = SampleData.GetEmployees()
Me.radDataFilter.FilterDescriptors.Add(New FilterDescriptor("Name", FilterOperator.Contains, "m"))

See Also