Hi there,
Spent quite a while looking into this and haven't seen an answer yet...
I have a "simple" grouped grid. When I export it to Excel, there is an extra empty column (A). How can I remove this first column from excel.
Here is what I've tried...
I assume the empty column is a combination of GridGroupSplitterColumn and Header Column. Using the following code...
...I am able to remove many of the blank cells. But the header row and grouped rows still have an empty cell on the left. So again, my question is, how can I remove all empty cells in that first column (A) when exporting a grouped grid to Excel?
Thanks for your help...
Joe
Spent quite a while looking into this and haven't seen an answer yet...
I have a "simple" grouped grid. When I export it to Excel, there is an extra empty column (A). How can I remove this first column from excel.
Here is what I've tried...
I assume the empty column is a combination of GridGroupSplitterColumn and Header Column. Using the following code...
Protected Sub btnExport_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnExport.Click |
RadGrid1.ExportSettings.ExportOnlyData = True |
RadGrid1.ExportSettings.IgnorePaging = True |
RadGrid1.ExportSettings.OpenInNewWindow = True |
RadGrid1.MasterTableView.ExportToExcel() |
End Sub |
Protected Sub RadGrid1_ExcelExportCellFormatting(ByVal source As Object, ByVal e As Telerik.Web.UI.ExcelExportCellFormattingEventArgs) |
If TypeOf e.FormattedColumn Is GridGroupSplitterColumn Then |
e.Cell.Visible = False |
End If |
End Sub |
...I am able to remove many of the blank cells. But the header row and grouped rows still have an empty cell on the left. So again, my question is, how can I remove all empty cells in that first column (A) when exporting a grouped grid to Excel?
Thanks for your help...
Joe