copying all rows in paged grid

3 posts, 0 answers
  1. Alex
    Alex avatar
    36 posts
    Member since:
    Sep 2010

    Posted 03 Apr 2012 Link to this post

    hi could you please point me into the right direction how to copy all rows in paged grid.. do you have an example anywhere or has this topic already been discused as I cannot seem to find any information. thanks

    and is it possible to do the same for Export (to Excel/CSV)?
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 04 Apr 2012 Link to this post

    Hello,

     You can set PageSize to 0 perform desired operation and return the original value back. 

    Greetings,
    Vlad
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. Alex
    Alex avatar
    36 posts
    Member since:
    Sep 2010

    Posted 04 Apr 2012 Link to this post

    Hi,

    how do I select all items and then copy them? Have a look at the code below. Once executed I only get one item on copy, which is the top item that selected on data load. I want also to mention that GridViewSessions.SelectAll() does select all items visually . Thanks
    GridViewSessions.SelectionMode = System.Windows.Controls.SelectionMode.Multiple;
    GridViewSessions.SelectAll();
     
    var copyCommand = RadGridViewCommands.Copy as RoutedUICommand;
    copyCommand.Execute(GridViewSessions.SelectedItems, GridViewSessions);
Back to Top