I tried creating a headergroup in the markup and when I exported it, a blank line showed in the BIFF/Excel, but the headergroup headertext did not show.
I created a dynamic headergroup
Dim headerGroup As New GridColumnGroup
dgSources.MasterTableView.ColumnGroups.Add(headerGroup)
headerGroup.Name = "customgroup"
headerGroup.HeaderText = "Some Title"
For Each gcColumn As GridColumn In dgSources.MasterTableView.Columns
If gcColumn.ColumnType = "GridBoundColumn" Then
gcColumn.ColumnGroupName = "customgroup"
End If
Next
Then tried to export it, and I got this error:
Invalid column name: customgroup
at Telerik.Web.UI.GridTableView.CreateMultiColumnHeaders(Boolean useDataSource, GridColumn[] copiedColumnSet, GridTHead thead)
at Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource)
at Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource)
at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data)
at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data)
at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
at Telerik.Web.UI.GridTableView.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
at Telerik.Web.UI.GridTableView.DataBind()
at Telerik.Web.UI.RadGrid.DataBind()
at Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason)
at Telerik.Web.UI.RadGrid.RebindForExport()
at Telerik.Web.UI.Grid.Export.TableViewExporter.PrepareForExportInternal(GridTableView tableView, Boolean ignorePaging, Boolean dataOnly)
at Telerik.Web.UI.Grid.Export.TableViewExporter.page_PreRender(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.Control.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)