Export all records to excel when I'm using RadDataPager for paging

3 posts, 0 answers
  1. Pankaj
    Pankaj avatar
    15 posts
    Member since:
    May 2011

    Posted 25 May 2011 Link to this post

    How can I export all the records to excel, when I'm using RadDataPager for paging.

    Currentl when I export it export only the records which are currently displayed in grid.

  2. Thomas LEBRUN
    Thomas LEBRUN avatar
    66 posts
    Member since:
    Sep 2009

    Posted 02 Jan 2012 Link to this post

    I have the exact problem: i'm exporting a RadGridView to Csv (bind to an IQueryable) and the export only displays the rows shown in first page.

    How can i get all the items to be exported ?

    Thanks !
  3. UI for WPF is Visual Studio 2017 Ready
  4. Dimitrina
    Dimitrina avatar
    3769 posts

    Posted 03 Jan 2012 Link to this post

    Hi Thomas,

    If I have understood you right, basically what you should do is:

    1. Save the PageSize and the PageIndex of the dataPager.
    2. Set the PageSize of the dataPager to 0. 
    3. Then export the data ((IEnumerable) dataPager.PagedSource ). 
    4. Set the PageSize and the PageIndex back.

    I hope that this is what you need. 

    All the best,
    the Telerik team

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

Back to Top