469,657 Members | 1,816 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,657 developers. It's quick & easy.

String Collection Property Editor

I have control. One of the properties is implemented as StringCollection. I
didn't use any Editor attribute for it.
During Design time system shows dialog similar to Items in DropDownList but
Add button throws an error "Constructor on type System.String not found.". I
may understand this message - there are too many contractor and non of them
takes string. But how can I fix the problem or may be use the editor similar
to Font.Names collection.
Thank you
Shimon.
Nov 19 '05 #1
3 4129
Hi Shimon,

Welcome to ASPNET newsgroup.
As for the problem with Editing StringCollection property in asp.net
webcontrol at design-time, it seems a known issue which is described in the
following blog article:

#StringCollectionEditor
http://blogs.msdn.com/toub/archive/2...12/241277.aspx

However, based on my research, though we can make the design-time editing
work, the ASP.NET runtime can not correctly parse the StringCollection's
perisstent content (which is different from winform ). So generally I'd
recommend that we define our custom class to wrapper the string value and
then define a Custom Collection based class to replace the
StringCollection. And we can define property of the custom collection class
for our custom control. Below is another community member's demo webcontrol
which contains complete demonstration on developing a rich design-time
support webcontrol:

#rich custom webcontrol sample
http://www.dalepreston.com/Blog/2005...cripts-to-your.
html

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Shimon Sim" <sh**********@community.nospam>
| Subject: String Collection Property Editor
| Date: Wed, 3 Aug 2005 09:06:25 -0400
| Lines: 11
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
| Message-ID: <On**************@tk2msftngp13.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: ool-44c05922.dyn.optonline.net 68.192.89.34
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msft ngp13.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:115842
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I have control. One of the properties is implemented as StringCollection.
I
| didn't use any Editor attribute for it.
| During Design time system shows dialog similar to Items in DropDownList
but
| Add button throws an error "Constructor on type System.String not
found.". I
| may understand this message - there are too many contractor and non of
them
| takes string. But how can I fix the problem or may be use the editor
similar
| to Font.Names collection.
| Thank you
| Shimon.
|
|
|

Nov 19 '05 #2
Thank you Steven. I already rewrote my code the way you described.
Thank you for links.
Shimon.
"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:nv*************@TK2MSFTNGXA01.phx.gbl...
Hi Shimon,

Welcome to ASPNET newsgroup.
As for the problem with Editing StringCollection property in asp.net
webcontrol at design-time, it seems a known issue which is described in
the
following blog article:

#StringCollectionEditor
http://blogs.msdn.com/toub/archive/2...12/241277.aspx

However, based on my research, though we can make the design-time editing
work, the ASP.NET runtime can not correctly parse the StringCollection's
perisstent content (which is different from winform ). So generally I'd
recommend that we define our custom class to wrapper the string value and
then define a Custom Collection based class to replace the
StringCollection. And we can define property of the custom collection
class
for our custom control. Below is another community member's demo
webcontrol
which contains complete demonstration on developing a rich design-time
support webcontrol:

#rich custom webcontrol sample
http://www.dalepreston.com/Blog/2005...cripts-to-your.
html

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Shimon Sim" <sh**********@community.nospam>
| Subject: String Collection Property Editor
| Date: Wed, 3 Aug 2005 09:06:25 -0400
| Lines: 11
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
| Message-ID: <On**************@tk2msftngp13.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: ool-44c05922.dyn.optonline.net 68.192.89.34
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msft ngp13.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:115842
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I have control. One of the properties is implemented as
StringCollection.
I
| didn't use any Editor attribute for it.
| During Design time system shows dialog similar to Items in DropDownList
but
| Add button throws an error "Constructor on type System.String not
found.". I
| may understand this message - there are too many contractor and non of
them
| takes string. But how can I fix the problem or may be use the editor
similar
| to Font.Names collection.
| Thank you
| Shimon.
|
|
|

Nov 19 '05 #3
You're welcome Shimon :-)

Good luck!
Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| From: "Shimon Sim" <sh**********@community.nospam>
| References: <On**************@tk2msftngp13.phx.gbl>
<nv*************@TK2MSFTNGXA01.phx.gbl>
| Subject: Re: String Collection Property Editor
| Date: Thu, 4 Aug 2005 06:19:57 -0400
| Lines: 81
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
| Message-ID: <Os**************@TK2MSFTNGP14.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: ool-44c05922.dyn.optonline.net 68.192.89.34
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:116062
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Thank you Steven. I already rewrote my code the way you described.
| Thank you for links.
| Shimon.
| "Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
| news:nv*************@TK2MSFTNGXA01.phx.gbl...
| > Hi Shimon,
| >
| > Welcome to ASPNET newsgroup.
| > As for the problem with Editing StringCollection property in asp.net
| > webcontrol at design-time, it seems a known issue which is described in
| > the
| > following blog article:
| >
| > #StringCollectionEditor
| > http://blogs.msdn.com/toub/archive/2...12/241277.aspx
| >
| > However, based on my research, though we can make the design-time
editing
| > work, the ASP.NET runtime can not correctly parse the StringCollection's
| > perisstent content (which is different from winform ). So generally I'd
| > recommend that we define our custom class to wrapper the string value
and
| > then define a Custom Collection based class to replace the
| > StringCollection. And we can define property of the custom collection
| > class
| > for our custom control. Below is another community member's demo
| > webcontrol
| > which contains complete demonstration on developing a rich design-time
| > support webcontrol:
| >
| > #rich custom webcontrol sample
| >
http://www.dalepreston.com/Blog/2005...cripts-to-your.
| > html
| >
| > Hope helps. Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| > --------------------
| > | From: "Shimon Sim" <sh**********@community.nospam>
| > | Subject: String Collection Property Editor
| > | Date: Wed, 3 Aug 2005 09:06:25 -0400
| > | Lines: 11
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
| > | X-RFC2646: Format=Flowed; Original
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
| > | Message-ID: <On**************@tk2msftngp13.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: ool-44c05922.dyn.optonline.net 68.192.89.34
| > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msft ngp13.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:115842
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | I have control. One of the properties is implemented as
| > StringCollection.
| > I
| > | didn't use any Editor attribute for it.
| > | During Design time system shows dialog similar to Items in
DropDownList
| > but
| > | Add button throws an error "Constructor on type System.String not
| > found.". I
| > | may understand this message - there are too many contractor and non of
| > them
| > | takes string. But how can I fix the problem or may be use the editor
| > similar
| > | to Font.Names collection.
| > | Thank you
| > | Shimon.
| > |
| > |
| > |
| >
|
|
|

Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by m. pollack. | last post: by
2 posts views Thread by Marco de Vries | last post: by
1 post views Thread by Friskusen | last post: by
reply views Thread by --== Alain ==-- | last post: by
2 posts views Thread by michelqa | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.