Databinding to a collection with a enumeration property


J

Jon

I have a class that has properties; "value","description" and "type".
The first two are string properties, but "type" is a enum type. I
create the instances of my class and put them in an Arraylist, then
bind that to a datagrid. The datagrid displays "value" and
"description", but not "type". I assume because it is an enumeration.
Can the DG be made to display this property? Thanks a lot!!
 
Ad

Advertisements

E

Eliyahu Goldin

Yes, just databind to an expression that will make a string out of
enumeration. Or add a property to the class that will convert enumeration to
string and databind to this property.

Eliyahu
 

Top