When exporting my grid to HTML everything works fine. I recently changed the formatting to BIFF and am seeing a problem with the header text on the dynamically added gridbound columns. For some reason, on these columns only, the header text is being repeated (ex Long NameLong Name). I also have dynamic template columns in my grid and they export just fine in BIFF.
As I said, this all works just fine with the HTML format.
Has anyone else seen this problem?
Thanks in advance for your help.
Code to add new column
bfield = new Telerik.Web.UI.GridBoundColumn();
bfield.AllowFiltering = true;
bfield.AllowSorting = true;
bfield.SortExpression = colName.AttributeName;
bfield.ShowSortIcon = true;
radGrid.MasterTableView.Columns.Add(bfield);
bfield.DataField = colName.AttributeName;
bfield.HeaderText = colName.DisplayName;
bfield.UniqueName = colName.DisplayName.Replace(" ", string.Empty);
bfield.HeaderStyle.Font.Size = 10;
Code to export
radGrid.ExportSettings.OpenInNewWindow = true;
radGrid.ExportSettings.ExportOnlyData = false;
radGrid.ExportSettings.IgnorePaging = true;
radGrid.ExportSettings.Excel.Format = GridExcelExportFormat.Biff;
radGrid.MasterTableView.ExportToExcel();
As I said, this all works just fine with the HTML format.
Has anyone else seen this problem?
Thanks in advance for your help.
Code to add new column
bfield = new Telerik.Web.UI.GridBoundColumn();
bfield.AllowFiltering = true;
bfield.AllowSorting = true;
bfield.SortExpression = colName.AttributeName;
bfield.ShowSortIcon = true;
radGrid.MasterTableView.Columns.Add(bfield);
bfield.DataField = colName.AttributeName;
bfield.HeaderText = colName.DisplayName;
bfield.UniqueName = colName.DisplayName.Replace(" ", string.Empty);
bfield.HeaderStyle.Font.Size = 10;
Code to export
radGrid.ExportSettings.OpenInNewWindow = true;
radGrid.ExportSettings.ExportOnlyData = false;
radGrid.ExportSettings.IgnorePaging = true;
radGrid.ExportSettings.Excel.Format = GridExcelExportFormat.Biff;
radGrid.MasterTableView.ExportToExcel();