Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Databinding to a collection with a enumeration property

Reply
Thread Tools

Databinding to a collection with a enumeration property

 
 
Jon
Guest
Posts: n/a
 
      07-13-2004
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!!
 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      07-14-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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!!



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re-using a simple type definition; with enumeration constraint andwithout enumeration constraint puvit82 XML 4 02-01-2008 03:46 PM
Collection problems (create Collection object, add data to collection, bind collection to datagrid) Řyvind Isaksen ASP .Net 1 05-18-2007 09:24 AM
Collection was modified; enumeration operation may Atif Sarfraz ASP .Net Building Controls 0 12-01-2006 09:39 PM
WebControl - CollectionEditor Problem. Changing id property of new added collection item causes not adding item to collection - Sergio ASP .Net Web Controls 0 05-29-2006 06:20 AM
Setting a Custom Control Property that is an enumeration (or other non primative type) from aspx page Earl Teigrob ASP .Net 4 05-19-2004 06:55 PM



Advertisments