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

Changing background color of selected cells in pivotview

Thread ID:





151402 Feb 10,2020 04:08 PM UTC Feb 14,2020 08:48 AM UTC Angular - EJ 2 3
Tags: PivotView
Asked On February 10, 2020 04:08 PM UTC


I use a Angular / Javascript pivotview with multiple cells selection enabled. 

How can i changed the background color of the selected cells ?

     this.pivotGridObj.gridSettings.allowSelection = true;
     this.pivotGridObj.gridSettings.selectionSettings =      { mode: 'Cell', cellSelectionMode: 'Flow', type: 'Multiple' }

I tried to access the grid object directly, but this is always undefined.

  if (this.pivotGridObj.grid !== undefined)
          this.pivotGridObj.grid.queryCellInfo = this.customiseCell;

 customiseCell(args: QueryCellInfoEventArgs) {
     // herefiltering for selected cells only 

Sivamathi Natarajan [Syncfusion]
Replied On February 11, 2020 08:33 AM UTC

Thanks for contacting Syncfusion support. 
You can change the background-color of the selected cells in CSS. Kindly check the below code example. 
Code Example: 
 .e-cellselectionbackground,.e-selectionbackground,.e-pivotview .e-grid .e-rowsheader.e-selectionbackground,.e-pivotview .e-grid .e-columnsheader.e-selectionbackground { 
              background-color: greenYellow !important; 
Meanwhile, we have prepared a sample for your reference. Kindly check the below sample link for your reference.  
We hope the above sample meets your requirement. 

Replied On February 13, 2020 08:56 PM UTC

Thank you, that solved my problem

Sivamathi Natarajan [Syncfusion]
Replied On February 14, 2020 08:48 AM UTC

Hi Rainer, 
Thanks for the reply. Please get in touch with us if you would require any further assistance.  


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon