Groups | Blog | Home
all groups > asp.net building controls > september 2006 >

asp.net building controls : Nested Collection property in a custom control



apratimg NO[at]SPAM gmail.com
9/27/2006 8:58:56 AM
I have the extactly the same problem.. I am creating a control where a
collection property is exposed which has a nested collection object.

It looks something like this once i enter data through the default
editor (in the design view)..

<COL_A>
<A1:COL_A_ITEM Name="Test" Index="1">
<COL_B>
<A1:COL_B_ITEM Visible="True"></A1:COL_B_ITEM>
<A1:COL_B_ITEM Visible="True"></A1:COL_B_ITEM>
</COL_B>
</A1:COL_A_ITEM>
</COL_A>

I have implemented IStateManager. It works fine for other items i have
in this control. But for this property its no able to save this values
and gives me a blank control while rendering.

I have applied ParseChildren and PersistChildren.. Also
DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
PersistenceMode(PersistenceMode.Attribute)

So i am totally clue less why it will not save as the serialization is
happeneing properly. Do i need to implement a typeconverter?

Thanks
Rahul
Gaurav Vaish (www.EduJiniOnline.com)
9/30/2006 7:27:35 PM
[quoted text, click to view]

Do you mean in the ViewState?
Ensure that COL_A_ITEM saves the state of COL_B_ITEM's in the collection
when it saves its view-state.


--
Happy Hacking,
Gaurav Vaish | http://www.mastergaurav.com
http://www.edujinionline.com
http://articles.edujinionline.com/webservices
-------------------

AddThis Social Bookmark Button