New to Telerik UI for WPF? Download free 30-day trial

Filtering through RadDataFilter

If you bind RadDataFilter.Source to RadDataServiceDataSource.DataView, you will get automatic server-side filtering. When the user defines his filtering criteria through RadDataFilter’s UI, RadDataFilter will automatically transfer the resulting FilterDescriptors to RadDataServiceDataSource. If RadDataServiceDataSource.AutoLoad is true, the control will automatically go to the server and get the data that matches these FilterDescriptors.

<Grid x:Name="LayoutRoot" Background="White"> 
  <RowDefinition Height="Auto"/> 
  <RowDefinition Height="*"/> 
 <telerik:RadDataServiceDataSource Name="customersDataSource" QueryName="Customers" AutoLoad="True"> 
 <telerik:RadDataFilter Grid.Row="0" Source="{Binding DataView, ElementName=customersDataSource}"/> 
 <telerik:RadGridView Grid.Row="1" ItemsSource="{Binding DataView, ElementName=customersDataSource}"  
    IsBusy="{Binding IsBusy, ElementName=customersDataSource}"  

On running the application, you may perform the following:

If AutoLoad is false, the descriptors will be transferred to RadDataServiceDataSource, but no trip to the server will be made until the Load method is called.

In this article
Not finding the help you need? Improve this article