
David Sitton
Top achievements
Rank 1
David Sitton
asked on 18 Aug 2008, 02:00 PM
Hi,
Hope someone can help figure this out with me.
I am exporting data from RadGrid to CSV ...
Hope someone can help figure this out with me.
I am exporting data from RadGrid to CSV ...
RadGrid1.ExportSettings.OpenInNewWindow =
true;
RadGrid1.ExportSettings.ExportOnlyData = true;
RadGrid1.ExportSettings.IgnorePaging = true;
RadGrid1.MasterTableView.ExportToCSV();
I have paging switched on and PageSize set to 10.
I have over 10 pages of data but when I click to export it only exports the first page.
Please can someone help. I'm sure its probably something really simple but I cannot see it.
Many thanks
4 Answers, 1 is accepted
0

Shinu
Top achievements
Rank 2
answered on 19 Aug 2008, 04:56 AM
Hi David,
IgnorePaging property specifies whether all records will be exported or just the current page. Not sure what is happening on your end. One another suggestion will be to set AllowPaging to false in the export button click event and then perform the export operation.
CS:
Regards
Shinu.
IgnorePaging property specifies whether all records will be exported or just the current page. Not sure what is happening on your end. One another suggestion will be to set AllowPaging to false in the export button click event and then perform the export operation.
CS:
protected void Button1_Click1(object sender, EventArgs e) |
{ |
RadGrid1.MasterTableView.AllowPaging = false; |
RadGrid1.Rebind(); |
RadGrid1.ExportSettings.OpenInNewWindow = true; |
RadGrid1.MasterTableView.ExportToExcel(); |
} |
Regards
Shinu.
0

David Sitton
Top achievements
Rank 1
answered on 19 Aug 2008, 07:41 AM
Thank you Shinu, that seems to have worked although I would be interested in why it wasn't working the way I did it if anybody has any clues.
Thanks,
David
Thanks,
David
0

brian
Top achievements
Rank 1
answered on 12 Mar 2010, 04:45 PM
if (e.Item.Text == "Excel") |
{ |
RadGrid1.MasterTableView.AllowPaging = false; |
RadGrid1.PageSize = RadGrid1.Items.Count + 1; |
RadGrid1.MasterTableView.ExportToExcel(); |
} |
This was the only way i could get my myriad of grids to export.
0

Talys
Top achievements
Rank 1
answered on 29 May 2010, 09:39 PM
I had the same problem. After looking over the samples, I discovered that the problem is that I needed to add code to handle NeedDataSource.
The issue is that I explictly fill my grid and perform a DataBind during Page Load. I had no handler for NeedDataSource.
As soon as I called my FillGrid() from NeedDataSource, the export worked perfectly. I had to make a small adjustment to my FillGrid to not DataBind when called from NeedDataSource.
The issue is that I explictly fill my grid and perform a DataBind during Page Load. I had no handler for NeedDataSource.
As soon as I called my FillGrid() from NeedDataSource, the export worked perfectly. I had to make a small adjustment to my FillGrid to not DataBind when called from NeedDataSource.