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

GridExcelExportFormat.ExcelML fires databind twice

2 Answers 49 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Regula
Top achievements
Rank 1
Regula asked on 20 Sep 2012, 02:14 PM
Hi!

I have a scenario with a RadGrid binded to a ObjectDataSource ( DataSourceID = "DS")

<asp:ObjectDataSource ID="DS" runat="server" EnablePaging="True"                SelectCountMethod="GetListCount"<br>                SelectMethod="GetList" SortParameterName="sortType" TypeName="...."><br></asp:ObjectDataSource>

I've noticed then when I export da grid the  " grid.MasterTableView.ExportToExcel();" fires the GetList() method twice. This doesn't happens when I rebind the grid after the user clicked the search button. This only happens when exporting the grid. What may be causing the GetList method is being called twice each time call the export.?

Best regards



2 Answers, 1 is accepted

Sort by
0
Accepted
Antonio Stoilkov
Telerik team
answered on 25 Sep 2012, 08:37 AM
Hello Vasco,

You could try resolving your issue by setting the ExportSetting IgnorePaging to false because when setting the IgnorePaging to true the export functionality needs one additional call to the SelectMethod to retrieve all data items in order to export them.
<ExportSettings IgnorePaging="false"></ExportSettings>

Greetings,
Antonio Stoilkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Regula
Top achievements
Rank 1
answered on 25 Sep 2012, 04:56 PM
Thanks Antonio, it works.
Tags
Grid
Asked by
Regula
Top achievements
Rank 1
Answers by
Antonio Stoilkov
Telerik team
Regula
Top achievements
Rank 1
Share this question
or