We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Changing style of grid


I would like to change the background colors of the pivot grid.  I tried modifying the base style maps but only Standard seemed to be affected.  I cannot change the color of the Row / Column headers.
How would I go about customizing the pivot grid?

1 Reply

NK Neelakandan Kannan Syncfusion Team May 26, 2016 06:47 AM UTC

Hi Chris, 

Thanks for using Syncfusion products. 

If you want to change the color of the headers or any cells in the PivotGridControl, you can use the QueryCellInfo event of the TableModel. The cell type can be checked by using CellType property. Please make use of below code, 

Code Snippet: 
//Trigerring the event. 
this.pivotGridControl1.TableModel.QueryCellInfo += new Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventHandler(TableModel_QueryCellInfo); 
void TableModel_QueryCellInfo(object sender, Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventArgs e) 
//Checking the header cells. 
if (e.Style.CellType == "PivotGridHeaderCell") 
e.Style.Themed = false; 
e.Style.BackColor = Color.LightPink; 
//Checking the total value cells. 
if (e.Style.CellType == "PivotGridTotalValueCell") 
e.Style.BackColor = Color.LightGreen; 

Live Chat Icon For mobile
Up arrow icon