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
Is there a way for a ValueBasedAppearance to override the "selected" appearance?
posted

I have a UltraWinGrid and one column has a ValueBasedAppearance which changes the ForeColor of the cell based on the value.  This works great.  The problem occurs when the row is selected, and then the ForeColor of that column is being changed.  Is there a way for the cell to keep it's ValueBasedAppearance even when it's selected? 

Or - is there a way I can get the ValueBasedAppearance from within my DrawFilter... so I can override the SelectedAppearance? (For example, if a cell has an appearance with a ForeColor, my custom DrawFilter does not change the color when the row is Selected).

This isn't urgent as I could just add this cell drawing to my custom DrawFilter, and determine the ForeColor correctly there.  I'm just wondering if there was an easier way.  Thank you.

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    I recommend using the IniitalizeRow event to set the Appearance on the cell, instead of using the ValueBasedAppearance. What you can do is set both the Appearance and the SelectedAppearance on the cell, so that way the ForeColor is the same in both states. You may want to set the ActiveAppearance on the cell, as well, if you are using an ActiveRowAppearance in your grid.

Children