This is a migrated thread and some comments may be shown as answers.

copying all rows in paged grid

2 Answers 57 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alex
Top achievements
Rank 1
Alex asked on 03 Apr 2012, 05:27 PM
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 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 04 Apr 2012, 06:46 AM
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 >>
0
Alex
Top achievements
Rank 1
answered on 04 Apr 2012, 11:05 AM
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);
Tags
GridView
Asked by
Alex
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Alex
Top achievements
Rank 1
Share this question
or