SubElements in my WebControl

Discussion in 'ASP .Net' started by Daniel Jorge, Jul 10, 2005.

  1. Daniel Jorge

    Daniel Jorge Guest

    Hi there,

    I'm in need to create a WebControl with subelements, just like ListBox,
    DropDownlList and stuff. But, of course, it's myh custom Item and not a
    ListItem control.
    The final result should be like this one (HTML / Design-time)

    <myNamespace:myControl id="myControl">
    <myNamespace:myItem property1="teste" property2="teste1" ></myItem>
    <myNamespace:myItem property1="teste" property2="teste2" ></myItem>
    <myNamespace:myItem property1="teste" property2="teste3" ></myItem>
    </myNamespace:myControl >

    I also want to edit this collection at design, setting my item
    collection thru "Friendly Interface".
    I've tryied several approaches but none seems to work:
    1 - Create 3 classes
    MyItem Class with both Prop1 and 2
    MyItemCollection: implementing IList, IStateManager and ICollection
    MyControl: inherits from WebControl and has a Items property which
    is a MyItemCollection
    Didn't work

    2 - From the exemple above, I merged class 2 and 3. No success.

    3 - From the 1st exemple, replaced MyItemCollection by ArrayList...
    Again, no success.

    Could anyone help on this pplease????

    Thanks you very much!!

    Daniel
    Daniel Jorge, Jul 10, 2005
    #1
    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. Nitin Khurana
    Replies:
    2
    Views:
    822
    Jonathan Bromley
    Apr 27, 2004
  2. Nicole Szymanski
    Replies:
    3
    Views:
    798
  3. thomas
    Replies:
    2
    Views:
    385
    thomas
    Jan 25, 2004
  4. David Simons

    print all subelements plus content

    David Simons, Feb 23, 2005, in forum: XML
    Replies:
    0
    Views:
    373
    David Simons
    Feb 23, 2005
  5. David Simons

    print all subelements plus content

    David Simons, Feb 23, 2005, in forum: XML
    Replies:
    1
    Views:
    425
    Warrell Harries
    Feb 24, 2005
Loading...

Share This Page