Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > PersistChildrenAttribute class and collections in design-time prob

Reply
Thread Tools

PersistChildrenAttribute class and collections in design-time prob

 
 
A.J. van der Burg
Guest
Posts: n/a
 
      02-07-2005
Hi all,

I have a problem with maintaning the elements of a collection in design
time. I have a custom webcontrol, which in turn has a collection of child
controls. When I use the PersistChildenAttribute class, this collection is
not maintained when viewing the control in design time. In runtime,
everything is OK. Here are some designer settings of the classes involved:

[DefaultProperty("Tabs"),
DefaultEvent("SelectedIndexChanged"),
ToolboxData("<{0}:TabControl runat=server></{0}:TabControl>"),
ToolboxBitmap(typeof(TabControl), "Icons.TabControlIcon.bmp"),
Designer(typeof(TVW.Web.UI.Design.WebControls.TabC ontrolDesigner)),
ParseChildren(true, "Tabs"),
PersistChildren(true)]

The collection has the following attributes:
[PersistenceMode(PersistenceMode.InnerDefaultProper ty),
MergableProperty(false),
DesignerSerializationVisibility(DesignerSerializat ionVisibility.Content)]

If I remove the PersistChildrenAttribute everything works ok in design-time,
but I want to persist the controls created at a lower level (within the
collection), so basically I'm stuck. Does anyone have any ideas?

TIA,

Arnold Jan van der Burg
 
Reply With Quote
 
 
 
 
Nicole Schenk
Guest
Posts: n/a
 
      02-08-2005
A.J. van der Burg wrote:

> Hi all,
>
> I have a problem with maintaning the elements of a collection in design
> time. I have a custom webcontrol, which in turn has a collection of child
> controls. When I use the PersistChildenAttribute class, this collection is
> not maintained when viewing the control in design time. In runtime,
> everything is OK. Here are some designer settings of the classes involved:
>
> [DefaultProperty("Tabs"),
> DefaultEvent("SelectedIndexChanged"),
> ToolboxData("<{0}:TabControl runat=server></{0}:TabControl>"),
> ToolboxBitmap(typeof(TabControl), "Icons.TabControlIcon.bmp"),
> Designer(typeof(TVW.Web.UI.Design.WebControls.TabC ontrolDesigner)),
> ParseChildren(true, "Tabs"),
> PersistChildren(true)]
>
> The collection has the following attributes:
> [PersistenceMode(PersistenceMode.InnerDefaultProper ty),
> MergableProperty(false),
> DesignerSerializationVisibility(DesignerSerializat ionVisibility.Content)]
>
> If I remove the PersistChildrenAttribute everything works ok in
> design-time, but I want to persist the controls created at a lower level
> (within the collection), so basically I'm stuck. Does anyone have any
> ideas?
>
> TIA,
>
> Arnold Jan van der Burg

Perhaps you need to write your own support for serialization.
 
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
Audio prob that's more than a sound card prob LineOut Computer Support 3 04-19-2008 02:30 PM
Nested Class, Member Class, Inner Class, Local Class, Anonymous Class E11 Java 1 10-12-2005 03:34 PM
Printer prob and also networking prob Gareth not NLL or anybody else. Computer Support 2 01-02-2004 07:48 PM
Sorting collections based on nested collections Doug Poland Java 9 09-27-2003 10:46 PM
InnerProperty Persistance for Collections containing other Collections mutex ASP .Net Building Controls 0 07-27-2003 02:45 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