472,331 Members | 1,887 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,331 software developers and data experts.

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 4220
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: m. pollack. | last post by:
Hi all, Is there any information to be had about the "Object Collection Editor" that appears when you click on a collection property in the...
2
by: Edward Diener | last post by:
In C++ an overridden virtual function in a derived class must have the exact same signature of the function which is overridden in the base class,...
2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues....
2
by: Marco de Vries | last post by:
I have a user control and I want to add some properties in design time using a Colelction editor. I defined a type and collection for example. ...
1
by: Friskusen | last post by:
I have (almost) added a simple Toolbar custom control to my control library. The Items on the toolbar are implemented in a class named...
4
by: Michael | last post by:
Dear all .. If I want to use develop a user control and declare a public property which the type is...
0
by: --== Alain ==-- | last post by:
Hi, I would like to re-create the same behavior as we can find on ListView control property when you want to add a new column. Basically, i...
7
by: R.A.F. | last post by:
Hi, I'm still having my issue with my collection. I remind you the facts : - I have a class called "Row". - I have a collectionbase class named...
2
by: michelqa | last post by:
Hi, I'm trying to display a list of string in the string collection editor just like the "items" property of an ListBox in VS IDE.... I can...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.