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

Row coloring

Hi,

I'm binding my DataSource(DataTable) to a GridGroupingCOntrol and would like to color rows based on attributes of objects stored in a cache.
I'm currently doing this in QueryCellStyleInfo, code snippet is attached.
Basically the row should be colored red if its corresponding object is inactive and checking this each time in QueryCellStyleInfo makes the grid very unresponsive and even crashes occasionally when too many user initiated events occurs as the CPU is constantly at 100%.
I tried checking if (e.Style.Color != Color.Red) before coloring the cell red but by default e.Style.Color is always not red.
Is there a more efficient way to do this? Thanks.




Sample142.zip

1 Reply

HA haneefm Syncfusion Team June 21, 2007 02:47 PM UTC

Hi Ys,

You need to create a BaseStyle and assign them in QueryCellInfo to avoid GDI leak in a grid. Please refer the following KB

http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=352

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon