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

Modifed Grid

Thread ID:





17902 Aug 19,2004 10:23 AM UTC Aug 19,2004 10:58 AM UTC WinForms 1
Tags: GridControl
Eddy Poullet
Asked On August 19, 2004 10:23 AM UTC

Hi, How can I set a colored cell value on a grid when the cell value has changed(e.g. blue) and when the cell value is new (e.g. green)? Is it possible to detect if a new value is changed back to the original (and restore the color to black)? Thanks, Eddy POULLET Brussels

Administrator [Syncfusion]
Replied On August 19, 2004 10:58 AM UTC

You will have to do this yourself. The grid does not normally cache any cell values other than the current value saved in the grid cell. So, if you want to know the if values are changed or new or ???, you will have to cache these values somehow tracking things yourself. You can handle the SaveCellInfo event, and in that event use e.RowIndex, e.COlIndex, e.Style.CellValue (new value), and grid[e.RowIndex, e.ColIndex].CellValue (oldValue) to set up your cache of changed values. You could subscribe to the PrepareViewStyleInfo event and if e.RowIndex, e.ColIndex point to a row/col in your cache, you would set e.Style.BackColor accordingly. Now if you grid supports moving rows/column, this complicates things a little. In that case, instead of using a separate cache to save the changes, you may want to put a custom object in e.Style.Tag in SaveCellInfo that holds the information about the changes. This way, when the rows/cols move, the information moves with them. The above assumes you are using aGridControl to hold the data. If you are using a virtual grid or a GridDataBoundGrid, then you would have to use a separate cache to save information as these grids do not store anything in their data object.


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