473,385 Members | 1,730 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,385 software developers and data experts.

Persist code for a Collection (for my custom component)

Hello all;

I have created a custom component, whose properties (let's call them
myObjectA and an collection of myObjectB) I'm trying to set via a GUI. I
have the GUI running after the user clicks a Designer Verb, and it gets the
values for myObjectA and myObjectB correctly.

The designer creates the code for myObjectA just fine, however I can't seem
to get it to work for the Collection of myObjectB's. At first I had an
arraylist of myObjectB's, then I tried creating a strongly-typed
myObjectBCollection class (extending CollectionBase), and still nothing. If
I create a singleton instance of myObjectB and fill the values for that, the
code will be generated properly, so I'm confident that the problem lies with
my handling (or lack thereof) of the collection.

What am I missing to get the designer to persist the code for the Collection
object??

Thanks for any and all help!

Derrick
Nov 15 '05 #1
1 1426
Have you marked the collection property with the
DesignerSerializationVisibility attribute?

[DesignerSerializationVisibility(DesignerSerializat ionVisibility.Content)]
public myObjectBCollection Bs
{
get { return objectBs; }
}

HTH;
Eric Cadwell
http://www.origincontrols.com
Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

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...
1
by: Alex Clark | last post by:
Hi all, Apologies for the cross-post but I can't determine if this is a VS .NET problem or a VB.NET language issue. I'm using .NET 1.1 SP1, VS 2003 EA, VB.NET. I'm coding a custom component...
3
by: Carlo \(MCP only\) | last post by:
Good afternoon I've developed some controls that holds specialized collections of items (a collection of ImageItems for a ImageComboBox, a collection of MenuItems for a Toolbar, etc.). The...
0
by: Jeremy Chapman | last post by:
I have included below virtually all the code to a control I'm trying to build. My issue is that an array list property in my control does not get persisted properly to the aspx page code in design...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.