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
390
Changing an UltraGrid's cell appearance when the underlying value changes.
posted

Hello,

I am working with a UltraWinGrid and UltraDataSource.  The requirement is that anytime a value in the grid changes, the grid cell appearance (backcolor/forecolor) changes.  What is the best way to do this using Infragistics?  Is there a design pattern I could follow?

The solution I have is to remember values that have changed before update the UltraDataSource row, and then to use this data structure to set the appropriate appearance (dirty/clean) in the InitializeRow event of the UltraWinGrid.  Then, call RefreshRow on the "changed" UltraWinGrid rows when the value is no longer considered dirty.  This feels a bit hacky to me, but it works.

Another idea: Add a column or columns to the UltraDataSource storing the "dirty status" of the UltraWinGrid cells, and perform similar logic in the InitializeRow event.  This solution avoided the "Refresh" iterations when trying to un-dirty a cell, but it bloats my UltraDataSource with extra columns.

Am I missing something? 

Thanks, Steve