Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Datagrid Control (http://www.velocityreviews.com/forums/f60-asp-net-datagrid-control.html)
-   -   Databinding to a collection with a enumeration property (http://www.velocityreviews.com/forums/t760851-databinding-to-a-collection-with-a-enumeration-property.html)

Jon 07-13-2004 07:27 PM

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

Eliyahu Goldin 07-14-2004 08:12 AM

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.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57