design time support for collections

Discussion in 'ASP .Net Building Controls' started by Pieter, Jun 9, 2005.

  1. Pieter

    Pieter Guest

    Hi,

    I have a servercontrol that contains a list of buttons. What I would like to
    do is to create property on my WebControl where I can edit the buttons
    (create, delete, set the order, set the name of each button, backgroundcolor
    of each button). What is working is that the property is visible and it
    contains the value "collection"

    The problem is when i click to manipulate the collection i get the "Object
    Collection Editor" where it is only possible to edit system objects and not
    my buttons.

    Anyone has any idea what I'm doing wrong?

    Pieter
     
    Pieter, Jun 9, 2005
    #1
    1. Advertising

  2. Pieter

    Guest

    The default collection editor will only work if there is an Item
    property called Item in the collection. Also, the collection has to
    implement IList. If you're inheriting from CollectionBase, that's
    already included. If you're inheriting from ControlCollection, you
    need to make sure you do the implementation yourself.

    Could you post the code for your collection class and for the
    collection's property in the main control?

    Lisa


    Pieter wrote:
    > Hi,
    >
    > I have a servercontrol that contains a list of buttons. What I would like to
    > do is to create property on my WebControl where I can edit the buttons
    > (create, delete, set the order, set the name of each button, backgroundcolor
    > of each button). What is working is that the property is visible and it
    > contains the value "collection"
    >
    > The problem is when i click to manipulate the collection i get the "Object
    > Collection Editor" where it is only possible to edit system objects and not
    > my buttons.
    >
    > Anyone has any idea what I'm doing wrong?
    >
    > Pieter
     
    , Jun 10, 2005
    #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. Doug Poland
    Replies:
    9
    Views:
    738
    VisionSet
    Sep 27, 2003
  2. flamesrock
    Replies:
    8
    Views:
    486
    Hendrik van Rooyen
    Nov 24, 2006
  3. mutex
    Replies:
    0
    Views:
    216
    mutex
    Jul 27, 2003
  4. A.J. van der Burg

    PersistChildrenAttribute class and collections in design-time prob

    A.J. van der Burg, Feb 7, 2005, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    112
    Nicole Schenk
    Feb 8, 2005
  5. Bret Pettichord
    Replies:
    0
    Views:
    102
    Bret Pettichord
    May 3, 2004
Loading...

Share This Page