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
190
UltraGrid Conditional Cell Formatting Based On Dates
posted

Forgive me if this question has already been answered. I'm populating a UltraWinGrid and two of the columns have dates. I'm attempting to conditionally format the cell's background color depending on date ages of "no date", 6months, 8 months, and 12 months, as compared to the current date. I think I should be using the ValueBasedAppearance, The Conditional Formatting dialog box, and the UltraCalcManager, but am not 100% sure if this is the correct approach. Can someone point me to examples of conditional cell formatting based on date values?

Thanks,

-Todd

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Todd,

    ValueBasedAppearances are most useful at design-time where you can use the designer to set them up. It is therefore difficult for us to provide useful samples for them - because the functionality relies on the designer, not the code.

    If you are setting up your appearances at design-time, your grid has to have a data source at design-time and the columns must already exist. If that's the case, then I'm sure there are tutorials in the documentation that would help you here.

    But if you are trying to apply the appearances at run-time, it's much easier to use the InitializeRow event and apply an appearance to the cell yourself. There is sample code in the WinGrid Performance Guide which describes how to do this in the most efficient way.

Children