Databinding to a collection with a enumeration property

Discussion in 'ASP .Net Datagrid Control' started by Jon, Jul 13, 2004.

  1. Jon

    Jon Guest

    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!!
     
    Jon, Jul 13, 2004
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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, Jul 14, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Earl Teigrob
    Replies:
    4
    Views:
    521
    Earl Teigrob
    May 19, 2004
  2. Øyvind Isaksen
    Replies:
    1
    Views:
    1,023
    Øyvind Isaksen
    May 18, 2007
  3. puvit82
    Replies:
    4
    Views:
    779
    puvit82
    Feb 1, 2008
  4. Nathan Sokalski

    Entering an enumeration type as a property

    Nathan Sokalski, Nov 4, 2009, in forum: ASP .Net
    Replies:
    6
    Views:
    449
    Herfried K. Wagner [MVP]
    Nov 7, 2009
  5. Atif Sarfraz

    Collection was modified; enumeration operation may

    Atif Sarfraz, Dec 1, 2006, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    152
    Atif Sarfraz
    Dec 1, 2006
Loading...

Share This Page