I've noticed that when I have a radgrid with "AutoGenerateColumns='false'" and then set the export property "RadGrid1.ExportSettings.IgnorePaging = false" no data from the grid is exported to excel. If I remove the AutoGenerateColumns property/attribute, it works fine.
I've applied the AutoGenerateColumns attribute to both the RadGrid and the MasterTableView (not at the same time), and even set it as a property in the code behind, but nothing is working.
Here's the grid as I currently have it:
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" AllowPaging="true" AllowSorting="true">
<MasterTableView >
</MasterTableView>
</telerik:RadGrid>
And Here's the codebehind that calls the ExportToExcell method:
private void btnExcel_Click(object sender, EventArgs e)
{
ConfigureReport();
RadGrid1.MasterTableView.ExportToExcel();
}
private void ConfigureReport()
{
RadGrid1.ExportSettings.FileName = "RadGridExportToExcel";
RadGrid1.ExportSettings.IgnorePaging = this.cbxPaging.Checked;
RadGrid1.ExportSettings.ExportOnlyData = this.cbxFormat.Checked;
RadGrid1.ExportSettings.OpenInNewWindow = true;
}
Any ideas?
Thanks,
Pat Lindley