![]() |
Databinding to a collection with a enumeration property
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!! |
Re: Databinding to a collection with a enumeration property
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 "Jon" <woo1000@hotmail.com> wrote in message news:6ad0344d.0407131127.53fbe18f@posting.google.c om... > 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!! |
| All times are GMT. The time now is 09:13 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.