Custom paging a huge data set

2 posts, 0 answers
  1. David
    David avatar
    1 posts
    Member since:
    Apr 2012

    Posted 27 Apr 2012 Link to this post

    I am using the RadGridView and RadDataPager in a WPF application. I have a method that pulls pages of Employees from a database (or some other data source). There are more Employees than I want to put in memory at one time, so I need to page the data retrieved from the database.


    So, I have a method that returns pages of data in the form of IEnumerable<Employee>. Each IEnumerable<Employee> is one page of data.  The xaml is set up this way:




            <telerik:RadGridView ItemsSource="{Binding PagedSource, ElementName=radDataPager}"

                                 Horizontal Alignment="Left"








                    <telerik:GridViewDataColumn DataMemberBinding="{Binding FirstName}"

                                                Header="First Name"

                                                UniqueName="FirstName" />

                    <telerik:GridViewDataColumn DataMemberBinding="{Binding LastName}"

                                                Header="Last Name"

                                                UniqueName="LastName" />

                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Age}"

                                                Header="How Old?"

                                                UniqueName="Age" />



            <telerik:RadDataPager x:Name="radDataPager"

                                  Source="{Binding Employees2}"










    I only get the first page with 3 records. Can this be fixed, or am I trying to do something that these controls do not support?


    What would be a better way to do what I am trying to do?








  2. Rossen Hristov
    Rossen Hristov avatar
    2478 posts

    Posted 30 Apr 2012 Link to this post


    The PageSize of your pager is set to 3, so it is quite normal to get a page containing 3 records.

    Maybe in your case you should consider the Unbound Mode of RadDataPager which allows you to page anything in any way.

    Please, read my blog post to learn more about the pager.

    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top