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

Custom Serialization and DataGridView

I want to serilaize the Columns and rows in a grid. As grid and
columncollection from DataGridView are not serializable, the derive from the
respecitive classes and implement ISerializable interface. But I can't
implement the protected constructor for serialization for Columns as the
basde class(DataGridViewColumnCollection) doesn't have a default constructor.
What is an alternative forthis?
Nov 9 '06 #1
2 6093
If what you are actually after is the data, then I would write custom
objects to hold them as properties, or use a DataSet, and use DataSource to
display the data in the DataGridView. Then you can serialize / deserialize
the data objects completely independently of the DataGridView, which is
(after all) a UI element an not really suited to serialization.

Marc
Nov 9 '06 #2
Serialise the source data and rebind the grid at the destination

Ciaran O'Donnell

"ManjuG" wrote:
I want to serilaize the Columns and rows in a grid. As grid and
columncollection from DataGridView are not serializable, the derive from the
respecitive classes and implement ISerializable interface. But I can't
implement the protected constructor for serialization for Columns as the
basde class(DataGridViewColumnCollection) doesn't have a default constructor.
What is an alternative forthis?
Nov 9 '06 #3

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

Similar topics

0
by: psy000 | last post by:
Hi, I have a C# web service client that talks to a JAVA application sever. I use AXIS to generate the WSDL file, use wsdl.exe to generate proxy stub c# code. When I try to use c# client connect...
1
by: Knecke | last post by:
Hi all. I have a problem with returning a custom Result object with webservice. The classes i use is described below (some fields and properties is removed) public class Result { int...
1
by: leodippolito | last post by:
Dear sirs, I am using custom wrappers to primitive types in my classes, so I can have some flags when working with the database ("undefined" and "null") .. So instead of: public class...
3
by: Zachary Turner | last post by:
Hello, I have a situation where I would like to perform custom serialization and deserialization of an existing .NET framework object (specifically, System.DateTime). Is there a common paradigm...
4
by: Val | last post by:
I have a complex object that I need to serialize. Rather than rely on a standard routine, which is called during the serialization/deserialization, I would like to be able to use my own functions...
4
by: ThunderMusic | last post by:
Hi, I have a custom form that works fine when I debug it or run it in release mode but cannot be loaded in the designer... Actually, it can be loaded in the designer when no control is on it, but...
1
by: lbelkova | last post by:
Hello, I've created a custom DataGridViewColumn. Everything work well, except for some reason the column doesn't accept some of the chars: "q", "." and "'". Did anybody have a similar problem?...
11
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
I have worked with application settings in VS2005 and C# for awhile, but usually with standard types. I have been trying to store a custom container/class/type in an application setting and I have...
2
by: DaveL | last post by:
Hello, I have a Custome Control which contains TextBox Button DataGridView design is Textbox , button When a user clicks the button i resize the custom control canvasarea to expose the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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
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.