5 Answers, 1 is accepted
Please check this demo for more info (you need to download our demos and check it locally).
Best wishes,Vlad
the Telerik team
Hi Vlad
Thank you
I look at the demo before and it only export the current page its wonderful
But I need way to export all the items in grid.
I checking now if the extension ToHtml() can help.
I appreciate if you can send my code that shows how to do it.
Best regard
Ehud
The demo is exactly related to exporting all data instead only current page.
Sincerely yours,Vlad
the Telerik team
Hi Vlad
This demo show how to export all grid without Pager
GridViewExportOptions exportOptions = new GridViewExportOptions();
exportOptions.Format = format; exportOptions.ShowColumnFooters = true;
exportOptions.ShowColumnHeaders = true;
exportOptions.ShowGroupFooters = true;
RadGrid.Export(stream, exportOptions);
So if you work with RadDataPager you don’t need to do this
int originalPageSize = dataPager.PageSize;
int originalPageIndex = dataPager.PageIndex;
…
RadGridView1.Export(stream, exportOptions);
dataPager.PageSize = originalPageSize;
dataPager.PageIndex = originalPageIndex;
the problem is when you work with RadDataPager and do this
RadGrid.Export(stream, exportOptions);
If you can send me demo code that export all grid with RadDataPager
I will appreciate this
Best regards
ehud
Hi Vlad
I resoled the problem
I give the
exportOptions.Items = RadGrid.ItemsSource;
Thanks
Ehud