.NETGURU
How to persist data in child controls?
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngcontrolsvb' list.


Anders.Vikstrom@banqit.com
Hi,

I've made a composite (web) control consisting a textbox, a button and
validator. These are all exposed as directly as class properties, which =
make
it possible to expand them to show all their properties in the =
Properties
pane when selecting the composite control on the page designer. While
expanded I can change the child controls properties as any other =
property.
However, only properties directly belonging to the composite control =
are
persisted - not the properties of the child control.=20

I've unsuccessfully tried the PersistChildren attribute. I've also =
tried to
use a TypeConverter. The property did get persisted if I converted the =
class
into a string, but then I only could enter a string in the Properties =
pane.
I read an article where they used PersistInfo, but it has been removed =
from
Beta 2. I think InstanceDescriptor coud be used instead, but I don't =
know
how.

All suggestions appreciated,

Anders Vikstr=F6m
SW Engineering, BANQIT AB
http://www.banqit.com
mailto:Click here to reveal e-mail address
Phone: +46 8 7594737

Reply to this message...
 
    
Susan Warren
Anders --

Try adding the following to your attributes to your complex properties:

[
=20
DesignerSerializationVisibility(DesignerSerializationVisibility.Content)
,
NotifyParentProperty(true)
]

hth,
Susan

-----Original Message-----
From: Click here to reveal e-mail address [mailto:Click here to reveal e-mail address]=20
Sent: Tuesday, August 21, 2001 11:30 PM
To: aspngcontrolsvb
Subject: [aspngcontrolsvb] How to persist data in child controls?

Hi,

I've made a composite (web) control consisting a textbox, a button and
validator. These are all exposed as directly as class properties, which
make
it possible to expand them to show all their properties in the
Properties
pane when selecting the composite control on the page designer. While
expanded I can change the child controls properties as any other
property.
However, only properties directly belonging to the composite control are
persisted - not the properties of the child control.=20

I've unsuccessfully tried the PersistChildren attribute. I've also tried
to
use a TypeConverter. The property did get persisted if I converted the
class
into a string, but then I only could enter a string in the Properties
pane.
I read an article where they used PersistInfo, but it has been removed
from
Beta 2. I think InstanceDescriptor coud be used instead, but I don't
know
how.

All suggestions appreciated,

Anders Vikstr=F6m
SW Engineering, BANQIT AB
http://www.banqit.com
mailto:Click here to reveal e-mail address
Phone: +46 8 7594737

| [aspngcontrolsvb] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngcontrolsvb.asp =3D JOIN/QUIT
| http://www.asplists.com/search =3D SEARCH Archives

Reply to this message...
 
    
Anders.Vikstrom@banqit.com
Thanx Susan,

I finally got it working. It took me some time to figure out how to use
those attributes. It worked as desired after I put the
DesignerSerializationVisibility attribute on the control property and =
the
NotifyParentProperty on the individual properties of the complex type.=20

/Anders

-----Original Message-----
From: Susan Warren [mailto:Click here to reveal e-mail address]
Sent: den 22 augusti 2001 17:58
To: aspngcontrolsvb
Subject: [aspngcontrolsvb] RE: How to persist data in child controls?

Anders --

Try adding the following to your attributes to your complex properties:

[
=20
DesignerSerializationVisibility(DesignerSerializationVisibility.Content)=

,
NotifyParentProperty(true)
]

hth,
Susan

-----Original Message-----
From: Click here to reveal e-mail address [mailto:Click here to reveal e-mail address]=20
Sent: Tuesday, August 21, 2001 11:30 PM
To: aspngcontrolsvb
Subject: [aspngcontrolsvb] How to persist data in child controls?

Hi,

I've made a composite (web) control consisting a textbox, a button and
validator. These are all exposed as directly as class properties, which
make
it possible to expand them to show all their properties in the
Properties
pane when selecting the composite control on the page designer. While
expanded I can change the child controls properties as any other
property.
However, only properties directly belonging to the composite control =
are
persisted - not the properties of the child control.=20

I've unsuccessfully tried the PersistChildren attribute. I've also =
tried
to
use a TypeConverter. The property did get persisted if I converted the
class
into a string, but then I only could enter a string in the Properties
pane.
I read an article where they used PersistInfo, but it has been removed
from
Beta 2. I think InstanceDescriptor coud be used instead, but I don't
know
how.

All suggestions appreciated,

Anders Vikstr=F6m
SW Engineering, BANQIT AB
http://www.banqit.com
mailto:Click here to reveal e-mail address
Phone: +46 8 7594737

| [aspngcontrolsvb] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngcontrolsvb.asp =3D JOIN/QUIT
| http://www.asplists.com/search =3D SEARCH Archives

| [aspngcontrolsvb] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngcontrolsvb.asp =3D JOIN/QUIT
| http://www.asplists.com/search =3D SEARCH Archives

Reply to this message...
 
 
System.ComponentModel.Design.Serialization.InstanceDescriptor
System.ComponentModel.DesignerSerializationVisibility
System.ComponentModel.TypeConverter




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification