Paging

RadGridView offers an excellent integration with Silverlight DataPager.

Telerik Silverlight DataGrid Features Paging 010

To connect the RadGridView with a DataPager you need to perform a few simple steps:

  • Add RadGridView and DataPager declarations.

<telerik:RadGridView x:Name="radGridView"/> 
<data:DataPager x:Name="dataPager"/> 

Do not forget that in order to create DataPager in the XAML, you first have to declare the following namespace:

  xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" 
  • Initialize a new instance of the Telerik.Windows.Data.QueryableCollectionView class. Set the source for the collection.

QueryableCollectionView qcv = new QueryableCollectionView(RadGridViewSampleData.GetEmployees()); 
Dim qcv As New QueryableCollectionView(RadGridViewSampleData.GetEmployees()) 
  • Set the newly created QueryableCollectionView instance as an ItemsSource/Source of the RadGridView/DataPager.

QueryableCollectionView qcv = new QueryableCollectionView(RadGridViewSampleData.GetEmployees()); 
dataPager.Source = qcv; 
radGridView.ItemsSource = qcv; 
Dim qcv As New QueryableCollectionView(RadGridViewSampleData.GetEmployees()) 
dataPager.Source = qcv 
radGridView.ItemsSource = qcv 

Take a look at the following topics which are entirely dedicated to the Paging functionality.

Take a look at the following topics which explain in great details the various features of the RadGridView.

See Also

In this article