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.
Unfortunately, activation email could not send to your email. Please try again.

Changing style of grid

Thread ID:





124230 May 25,2016 11:30 AM May 26,2016 02:47 AM Windows Forms 1
Tags: PivotGridControl
Chris Bishop
Asked On May 25, 2016 11:30 AM


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?

Neelakandan Kannan [Syncfusion]
Replied On May 26, 2016 02:47 AM

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; 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.