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!!
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top