Category / Section
How to dynamically change the header text in OLAP Grid?
1 min read
This KB illustrates that how to dynamically change the header text in OLAP Grid.
Solution
You can set the header text in OLAP Grid by using the following code example.
C#
this.OlapClient1.OlapGrid.RowBound += OlapGrid_RowBound; void OlapGrid_RowBound(object sender, RowBoundEventArgs e) { if (string.IsNullOrWhiteSpace(e.GridRow.Cells[0].Text)) e.GridRow.Cells[0].Text = "HeaderText"; }
VB
Private Me.OlapClient1.OlapGrid.RowBound += OlapGrid_RowBound Private Sub OlapGrid_RowBound(ByVal sender As Object, ByVal e As RowBoundEventArgs) If String.IsNullOrWhiteSpace(e.GridRow.Cells(0).Text) Then e.GridRow.Cells(0).Text = "HeaderText" End If End Sub