I created header with two lines by using <br/>. It looks fine, but during export to excel <br/> is visible. Here is the code example:
Dim ColumnNumeric As New GridNumericColumn()
grdResourceGrid.MasterTableView.Columns.Add(ColumnNumeric)
ColumnNumeric.HeaderStyle.HorizontalAlign = HorizontalAlign.Center
ColumnNumeric.DataField = dr("ResourceTitle")
ColumnNumeric.HeaderText = dr("ResourceTitle") & "<br/>$" & dr("Rate")
ColumnNumeric.SortExpression = dr("ResourceTitle")
ColumnNumeric.HeaderStyle.HorizontalAlign = HorizontalAlign.Right
ColumnNumeric.ItemStyle.HorizontalAlign = HorizontalAlign.Right
ColumnNumeric.DataFormatString = "{0:N2}"
I tried to solve it by adding additional header, but it didn't export at all. Code:
Dim newHeaderItem As New GridHeaderItem(grdResourceGrid.MasterTableView, 0, 0)
newHeaderItem.Cells.Add(New GridTableHeaderCell() With {.Text = "1"})
newHeaderItem.Cells.Add(New GridTableHeaderCell() With {.Text = "2"})
newHeaderItem.Cells.Add(New GridTableHeaderCell() With {.Text = "3"})
newHeaderItem.Cells.Add(New GridTableHeaderCell() With {.Text = "4"})
newHeaderItem.Cells.Add(New GridTableHeaderCell() With {.Text = "Steve"})
newHeaderItem.Cells.Add(New GridTableHeaderCell() With {.Text = "Chandler"})
newHeaderItem.Cells.Add(New GridTableHeaderCell() With {.Text = "Naomi"})
newHeaderItem.Cells.Add(New GridTableHeaderCell() With {.Text = "1_Naomi"})
newHeaderItem.Cells.Add(New GridTableHeaderCell() With {.Text = "1_Steve"})
newHeaderItem.Cells.Add(New GridTableHeaderCell() With {.Text = "1_Chandler"})
newHeaderItem.Cells.Add(New GridTableHeaderCell() With {.Text = "f"})
Please recommend solution