Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Infragistics UltraWinGrid and serialization issue

Status
Not open for further replies.

russellbcopeland

Programmer
Apr 26, 2001
113
US
Ok, this issue is a bit complex... I think.

I have a business object framework that I am using. My business objects have some data layer stuff baked into their base including their SQLConnection and SQLTransaction. The connection and transaction are not exposed through properties and can only be accessed through function calls.

I have a collection of business objects derived from this base.

I am using an Infragistics UltraWinGrid to display the objects contents. It displays the contents of the properties just fine. When I make a change on the grid the change goes into the appropriate property then the grid blows up with a data error.

The error I get is the following:

Unable to update the row:
The type System.Data.SqlClient.SqlConnection in Assembly System.Data, Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089 is not marked as serializable.

I know that the SQLConnection/SQLTransaction objects are not serializable but what the heck? Why is the grid doing anything with that anyway? It seems like the Infragistics grid is serializing the object to update it?

Anybody have any experience with this. Any light that could be shed would help out a lot.
 
Update to this issue:

It turns out that the Infragistics WindGrid does perform serialization on the objects that are attached to it. Personally I don't really understand why as it complicates and slows things down (they could just use reflection to determine the properties and get/set them as needed) they probably have a good reason but I don't know it.

the solution is to mark the objects in the class being displayed that are not serializable with the <System.NonSerialized()> attribute.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top