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

serializing the column collection

Hi,

I am adding the data binding feature to the list view control. I am bale to populate the column collection dynamically from the datasource. I would like to allow the user to remove or add any columns from this collection to the control. When I removed some of the column items in this collection from the collection editor on the properties window, this collection is not persisting the items and when i go back in to the form, it contains all the items from the datasource.

I have checked the code generated in the designer, there is nothing about this column collection. BUT if i add the column item manually to this collection, this new item appears in the designer with the addrange method.

i have got the listviewcolumnheader class and listviewcolumnheadercollection class which implements the collectionbase with add, addrange methods and indexer as well.

I have set the following design attributes on the collection property.

[Description("Gets the columns that are avialable in the datasource."), Browsable(true), Category("Data"),
DesignOnly(false), Bindable(BindableSupport.No)]
[DesignerSerializationVisibility(DesignerSerializat ionVisibility.Content)]
[EditorAttribute(typeof(System.ComponentModel.Desig n.CollectionEditor), typeof(System.Drawing.Design.UITypeEditor))]

public ListViewColumnHeaderCollection DetailColumns
{
get { return _detailColumns; }

}


Any help would be appreciated.

Thanks
May 22 '07 #1
0 888

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: dotNetDave | last post by:
I'm trying to create xml seriaizable collection class (below), but the xml keeps coming out wrong. In the resulting xml from the web service (below) the "ArrayOfAlarmProcessor" tag should really be...
1
by: Carl Gilbert | last post by:
Hi I am trying to serialize a collection of GUIDs by overriding the serialize function on a diagram component I am using. The following code sucessfully serializes a single GUID: Public...
3
by: Amy L. | last post by:
I am using the xml serializer to serialize the objects out of a collection into a file. The object that is being serialized is a class in my application. When I serialize my class it produces the...
2
by: Aleksei Guzev | last post by:
Imagine one writing a class library CL1 for data storage. He defines classes ‘DataItem’ and ‘DataRecord’ so that the latter contains a collection of the former. And he derives class ‘IntItem’ from...
1
by: Chris | last post by:
I'm having trouble Serializing a System.Data.DataColumn object. When I try to serialize it, I get the following: System.NotSupportedException: Cannot serialize member...
0
by: JackRazz | last post by:
I'm trying to serialize a collection to a file stream by serializing each object individually. The code below works fine with the BinaryFormatter, but the SoapFormatter reads the first object and...
3
by: RandomEngineer | last post by:
So here's the challenge... How can a collection (System.Collections.Generic.IList) of some custom type be serialized in a web service using .NET 2.0? Below are the class and the web methods in...
0
by: Yofnik | last post by:
Is there a way to avoid serializing an empty ArrayList? I would like the following class: public class Collection { public ArrayList Items = new ArrayList(); } ....to serialize like this:
1
by: Karthik1979 | last post by:
I have a custom class inherited from List<T> collection. Along with the base class functionality, I have included my additional properties. When serializing, only the base class items are serialized...
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: 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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.