Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
245
Highlight Changed Cells
posted

Hi I wanted somethign quite specific in this - i have looked the other posts, but they don't quite capture the feature i want.

I want to highlight cells that have their value changed from their 'original' value  (the value when the grid is bound.

so if the value was originally 0 - but then it was changed to 1 the cell would get highlighted

but if after that the cell was changed back to 0 (manually) it would get de-highlighted.

is this possible (maybe through cell value history?) or will i manually have to write something that writes the tag?

  • 12773
    posted

    Hello,

    I am just checking if you got this worked out or you still require any assistance or clarification on the matter.

    Thanks.

    Sincerely,
    Dimi
    Developer Support Engineer
    Infragistics, Inc.

  • 69686
    Suggested Answer
    posted

    Hello,

    This can be achieve with cell value history, however, the history is kept in the CellValuePresenter, which is virtualized using the default virtualization settings of the XamDataGrid. If you set the RecordContainerGenerationMode to PreLoad you will be able to handle the EditModeEnded (for example) event and change the background of the cell accordingly. You can find the attached project showing this. 

    However, if you have many records and PreLoad is not a good option, to the best of my knowledge, you would have to store the initial value (for example in the Cell.Tag) and handle this manually.

    WpfApplication26.zip