Edit this page

Paging

RadGridView offers an excellent integration with Silverlight DataPager.

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

  • Add RadGridView and DataPager declarations.

XAML

<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:

XAML

  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.

C#

QueryableCollectionView qcv = new QueryableCollectionView(RadGridViewSampleData.GetEmployees());

VB.NET

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

C#

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

VB.NET

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