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
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