473,396 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 4290
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 PropertyGrid control? I have a class that maintains a...
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, except for the return type which may return a...
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. I wrote an HTML page that describes all of the...
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. Public Class TestDefinition ... properties...
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 ToolbarItem. I also use a class ToolbarItemCollection to...
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 System.Windows.Forms.GridTableStylesCollection For example : Public Class LookAndView...
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 need : 1. to create a published property which will...
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 "RowsCollection" - I have a collectionEditor...
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 find many examples on the net but I cant find any...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.