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

How to programatically set background color of cell

I am using Blazor SfGrid which I populate programmatically when the page initializes
I would like to set the back ground color of 1 of 3 cells in each row based on which one has the lowest value.
What is the correct approach for this?


1 Reply

PS Prathap Senthil Syncfusion Team January 9, 2023 10:27 AM UTC

Hi Simon,

Thank you for contacting Syncfusion support.

Regarding your query on how to programmatically set the background color of a cell, we recommend using the querycellinfo event. You can find more information on this topic in the documentation links provided below:


https://blazor.syncfusion.com/documentation/datagrid/cell#customize-cell-styles

https://blazor.syncfusion.com/documentation/datagrid/events#querycellinfo

We hope this information is helpful. If you have any further questions or concerns, please don't hesitate to let us know.

Best regards,
Prathap S


Loader.
Up arrow icon