Articles in this section
Category / Section

How to change the cell style in OLAP Grid?

1 min read

You can change the style of a particular cell in OLAP Grid inside the QueryCellInfo event as illustrated in the following code example.


public MainWindow()
                this.olapgrid.OlapDataManager = new OlapDataManager("Data Source=; Initial Catalog=Adventure Works DW 2008 SE;");
                this.olapgrid.InternalGrid.QueryCellInfo += new Syncfusion.Windows.Controls.Grid.GridQueryCellInfoEventHandler(InternalGrid_QueryCellInfo);
            catch (Exception ex)
void InternalGrid_QueryCellInfo(object sender, Syncfusion.Windows.Controls.Grid.GridQueryCellInfoEventArgs e)
            e.Style.CellType = "Value";
            e.Style.CellValue = "$234509000.00";
            e.Style.Background = Brushes.Cyan;
            e.Handled = true;


Private Function MainWindow() As Public
            Me.olapgrid.OlapDataManager = New OlapDataManager("Data Source=; Initial Catalog=Adventure Works DW 2008 SE;")
            Me.olapgrid.InternalGrid.QueryCellInfo += New Syncfusion.Windows.Controls.Grid.GridQueryCellInfoEventHandler(InternalGrid_QueryCellInfo)
        Catch ex As Exception
        End Try
    End Function
 Private Sub InternalGrid_QueryCellInfo(ByVal sender As Object, ByVal e As Syncfusion.Windows.Controls.Grid.GridQueryCellInfoEventArgs)
        e.Style.CellType = "Value"
        e.Style.CellValue = "$234509000.00"
        e.Style.Background = Brushes.Cyan
        e.Handled = True
    End Sub


Did you find this information helpful?
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment