SubElements in my WebControl

D

Daniel Jorge

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top