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
310
ValueBasedAppearance for Enums
posted
I've a column in the ultragrid (wingrid) whose datatype is an enumeration I've defined as follows 

public enum ResultEnum : short

{[EnumDescription("OPEN")]

Open = 1,

[
EnumDescription("WON")]

Won = 2,

[
EnumDescription("LOST")]

Lost = 3,

[
EnumDescription("VOID")]

Void = 4,

[
EnumDescription("DEAD HEAT")]

DeadHeat = 5

}

 I want to set the cell's Forecolor to Green if the Result is WON and to Red if the Result is LOST.  Since the DataType of the column is set to the enum above, in the ValueBasedAppearance designer window, when I try to add a Operator Condition, I am not able to assign a value as whatever I type is treated as a string.  I added a formula condition [Result] = 2 (for Won) and [Result] = 3 (for Lost) and that works.  Is there a way I can use the Enumeration values instead of having to type the integer values? 

Parents Reply Children