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

[Solved] Problem with GridTemplateColumn when calling ExportToExcel

1 Answer 152 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lindsay Crawford
Top achievements
Rank 1
Lindsay Crawford asked on 31 Jul 2009, 12:36 PM
Hi,

I have a RadGrid with a template column that doesn't appear properly in Excel after calling ExportToExcel. Currently the column appears, but the only value I see in the fields are the values from the DataField that the column is bound to. I am wanting to see my custom data that gets populated on the databind for this field in each row and does get shown correctly in the browser. This for some reason does not show in the exported excel document.
I also find I can only view anything in Excel after setting the Format to GridExcelExportFormat.ExcelML. If I don't set it to this then I get an excel document with no data in it. Setting MasterTableView.EnableColumnsViewState = true rectifies this, but only if I remove my template column, else I get the "Cannot create column with the specified type name: GridTextBoxColumn" error. So obviously that doesn't help me.

Any help would be greatly appreciated.

Thanks,
-Lindsay

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 05 Aug 2009, 10:25 PM
Hello Lindsay,

For the convenience of our forum users I attached the modified version of your project to this post.

Regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Lindsay Crawford
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or