Edit this page

Filtering through RadGridView

If you bind RadGridView.ItemsSource to RadDataServiceDataSource.DataView, you will get automatic server-side filtering. When the user defines his filtering criteria through RadGridView’s UI, RadGridView 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">
 <telerik:RadDataServiceDataSource Name="customersDataSource" QueryName="Customers" AutoLoad="True">
  <telerik:RadDataServiceDataSource.DataServiceContext>
   <local:MyNorthwindContext/>
  </telerik:RadDataServiceDataSource.DataServiceContext>
 </telerik:RadDataServiceDataSource>
 <telerik:RadGridView Grid.Row="0" ItemsSource="{Binding DataView, ElementName=customersDataSource}" 
      IsBusy="{Binding IsBusy, ElementName=customersDataSource}" 
    ShowGroupPanel="False"/>  
</Grid>

Performing the filtering operation from the UI of the RadGridView should be as follows:

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.