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

RadGrid Export to Excel not exporting all columns to Excel file

1 Answer 220 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Durga
Top achievements
Rank 1
Durga asked on 02 Jul 2009, 12:44 PM
Hi,

RadGrid and  Export to Excel, all columns are not exporting to Excel file, some columns are missing while exporting but it working fine in some other page Below is the code for Export to Excel.

        grid1.DataSource = ViewState("OrderHeader")
        grid1.DataBind()
        grid1.ExportSettings.FileName = "OrderSummary"
        grid1.ExportSettings.IgnorePaging = True
        grid1.ExportSettings.OpenInNewWindow = True
        grid1.HeaderStyle.Font.Bold = True
        grid1.ExportSettings.Excel.Format = GridExcelExportFormat.ExcelML
        grid1.ExportSettings.ExportOnlyData = True
        grid1.MasterTableView.ExportToExcel()

Any help would be appreciated. Please help me out.

Thanks
Durga

1 Answer, 1 is accepted

Sort by
0
Computer Surgeon
Top achievements
Rank 1
answered on 08 Jul 2009, 10:12 AM
Hi there,

              I also faced the same issue as u have now. I just compared the attributes of the template column that was able to be Export to Excel and the one that was not able be Exported to Excel. I missed the UniqueName="ColumnName" and HeaderButtonType="TextButton" property for the column, When i compared. I just added that property it worked.

My suggestion is you might missed some property thats it. So double check the property of column that you might have missed.

If this is not working for u please let me know .
Tags
General Discussions
Asked by
Durga
Top achievements
Rank 1
Answers by
Computer Surgeon
Top achievements
Rank 1
Share this question
or