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

Cell background color change on row selection

Thread ID:





144750 May 21,2019 08:17 AM UTC May 27,2019 12:08 PM UTC ASP.NET Core 5
Tags: Grid
Petra Visic
Asked On May 21, 2019 08:17 AM UTC


I need your help.

I want some cells in grid to have different background color (to be somehow highlighted). So on queryCellInfo event, I change background color of particular cell with args.cell.bgColor = "#ffe0e0".
On row hoover event, background color of row changes, but those highlighted cells keep that color (#ffe0e0). [5th row on image]
But when row is selected, whole row background color changes, including those highlighted cells. [4th row on image] I would like to keep background color  of those cells in case of selection (as it is in the case of hoover). How can I achieve that?

Vignesh Natarajan [Syncfusion]
Replied On May 22, 2019 09:52 AM UTC

Hi Petra,  
Thanks for contacting Syncfusion support.   
Query: “Cell background color change on row selection  
From your query, we understand that you are facing issue while selecting a record which is formatted using queryCellInfo event. We are able to reproduce the reported issue at our end while using bgColor attribute to html element (cell).   
Since bgColor is html attribute, it's got over ridded by the css styles applied while selecting a record.  And is it not supported in html5. So, we suggest you apply styles using css property.   
Refer the below code example  
Refer the below screenshot for the output  
Please get back to us if you have further queries.   
Vignesh Natarajan.  

Petra Visic
Replied On May 22, 2019 10:50 AM UTC

Thanks for answer.
Unfortunately, the suggested solution does not work. I still get the same behaviour as before (when I was using html attribute).

Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On May 24, 2019 04:36 AM UTC

Hi Petra, 

Query#:- Unfortunately, the suggested solution does not work. I still get the same behaviour as before (when I was using html attribute). 
We have checked your reported problem by preparing the sample but we are unable to reproduce your reported issue at our end. Refer to the sample Link: 

We need some additional  information to find the cause of the issue. Share us the following details. 

  1. Complete Grid code example(both in server and client side).
  2. If possible replicate the issue in the above sample and revert us back.
  3. Video demo to replicate the issue.
  4. Exact scenario you have faced the issue.

Farveen sulthana T 

Petra Visic
Replied On May 24, 2019 07:55 AM UTC

Thanks for answer.
Your example works fine.
I managed to solve the problem by setting the background-image property...

Manivannan Padmanaban [Syncfusion]
Replied On May 27, 2019 12:08 PM UTC

Hi Petra,

Thanks for the update.

We are happy to hear that the reported issue was resolved. Please let us know if you need further assistance.


Manivannan Padmanaban.


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