Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > InnerProperty Persistance for Collections containing other Collections

Reply
Thread Tools

InnerProperty Persistance for Collections containing other Collections

 
 
mutex
Guest
Posts: n/a
 
      07-27-2003
Hi All,

Interesting problem.

SETUP:

Class A
{
string _name;
BCollection _b;

public string Name{get;set} -- code ommited sets/returns _name
public string BItemList{get;set} -- code ommited sets/returns
bcollection

}

Class B
{
string _id;
public string Name{get;set} -- code ommited returns _id
}

Class ACollection : CollectionBase
{
...Code ommited
}

Class BCollection : CollectionBase
{
...Code ommited
}


myControl : WebControl
{
ACollection _list;

[Bindable(true), Category("Data"),
DesignerSerializationVisibilityAttribute(DesignerS erializationVisibility.Vis
ible),
NotifyParentPropertyAttribute(true),
PersistenceModeAttribute(PersistenceMode.InnerProp erty ),
]
public virtual ACollection ItemList
{
get {return _list;}
}

So that is the setup. This is what WebForm designer will save in the aspx
file (uc1 is the registered tag prefix):
<uc1:myControl>
<ItemList>
<uc1:A Name="someting" BList="(Collection)" />
<ItemList>
</uc1:mycontrol>

Notice that BList is an attribute and its wrong, designer will throw an
error. So the question is, how to make VS Designer save BCollection so its
treated the same way as ACollection (like below) or any ideas on how to go
about it.

<uc1:myControl>
<ItemList>
<uc1:A Name="someting">
<BItemList>
<uc1:B Name="someting"/>
</BItemList>
</uc1:A>
<ItemList>
</uc1:mycontrol>

Thanks in advance.
Peter.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Persistance,Persistance,Persistance MHPNW STAFF Windows 64bit 5 05-24-2005 09:29 PM
Properties with PersistenceMode.InnerProperty not saved jahyen ASP .Net Building Controls 2 01-07-2005 07:12 PM
Persistence problem with custom control property using PersistenceMode.InnerProperty jahyen ASP .Net 0 01-06-2005 02:52 AM
Sorting collections based on nested collections Doug Poland Java 9 09-27-2003 10:46 PM
collection of Objects persistance Atif Jalal ASP .Net 0 08-13-2003 02:58 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57