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
435
Using the UltraDropDown with the WinGrid and Conditional Formatting
posted

Hi

 I've got a Grid which has a single column in a row of two columns. This column is using the DropDown control as a lookup via the ValueList property on the Column. It works great.

However, two questions:

1. Using  conditional formatting, is it possible to apply a format derived from one column across a whole row (or to another column) e.g. If ColumnA = 1 then set ColumnB's ForeColor to Red?

2. I can't get Conditional Formatting working using the DropDown column. It seems that the formats themselves come from the "real" column settings - but the logic to determine a match (with Operators) works against the lookup value e.g.  I have a column called StatusId, where this can be 0, 1, or 2. The DropDown resolves this to "Live", "Cancelled", or "Complete".  I want to color-code the rows depending on this status value. Where do I put the conditional format - on the WinGrid column (in which case what should I set the operators to match against?) or against the DropDown control? I have tried both approaches but neither seems to "work". Any advice greatly appreciated.

Thanks

Isaac 

  • 37774
    posted

     Issac,

    If I read your first question correctly, you want to resolve a cell's appearance based on the value in a different column.  This is possible using a FormulaCondition, which is only available if you site an UltraCalcManager on the form.  An example of a formula that you could use is "[Column 1] = 1"

     As for your second issue, the values that a condition will compare against 'owner' values; that is to say, whatever is actually stored in a cell is what's used for comparison.  When you have text showing that maps to a number, that does not necessarily have anything to do with the value, since it could have been altered with a DataFilter, editor, etc.  You could submit a feature request to expose the option on whether the grid should provide a condition/ValueBasedAppearance with the display text instead of the value, but for now you will have to use the underlying value.

    -Matt