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
430
ConditionValueAppearance and color detection
posted

Hi all,

 

I am using the ConditionValueAppearance feature to set the foreground color of the cells of a column: red if negative, and green if positive. The content of the cells changes in real time, and it works really well. Now, I want to add a cell flashing feature for those cells that change, and I want to make the background flash with a color that resembles the foreground color: imagine that a cell changes from -10 to -11, then the fore color would be bright red and the back color would be flashing with a light red.

The problem is that I cannot seem to be able to get to know the visible fore color for a given cell. UltraGridCell's Appearance.ForeColor always return the default color, and not the one applied by the column's ConditionValueAppearance. I tried to figure out the color by going through the whole UltraGridCell object in a debug session, but no luck.

I am using Infragistics 7.3.20073.1052. Any suggestions?

 

Thanks,

Stefano.

  • 469350
    Verified Answer
    Offline posted

    Hi Stefano,

    The forecolor that  is actually used for a cell is resolved via an very complex process. It accounts for the appearance on the cell, the appearance on the row, the appearance on the column, the ValueAppearance, Application Styling, the state of the row such as selected, active, etc., etc.

    So no single property can return the forecolor. What you have to do is use the ResolveAppearance method on the cell. This will go through the whole process and give you the actual appearance of the cell on-screen.