We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

loadSoap - without the data

Thread ID:

Created:

Updated:

Platform:

Replies:

56058 Feb 8,2007 05:01 PM Feb 9,2007 05:42 PM Windows Forms 3
loading
Tags: GridControl
Mark Calveric
Asked On February 8, 2007 05:01 PM

I am using a standard grid control. And would like to use savesoap/loadsoap to remember the column orders and widths, but not the data that was in the grid.

Is that possible?

Mark C

Administrator [Syncfusion]
Replied On February 8, 2007 06:28 PM

Hi Mark,

If this is a GridControl, then you can use GridModel.LoadBinary and this.grid.Model.SaveBinary (or LoadSoap & SaveSoap) to serialize your grids.

You can use this code snippet to load the layout information to grid.

this.grid.Model= GridModel.LoadSoap("layoutinfo.grd");

If these are GridDataBoundGrids, then we currently don't support direct serialization of this grid. Right now, you would have to do things yourself. Here is a forum tread that has a sample that serializes out column order and size.
http://www.syncfusion.com/forums/message.asp?MessageID=3918

Here is a sample that shows how you can serialize Datasource(custom collection).
http://www.syncfusion.com/Support/user/uploads/ISerializeSample_42c2a964.zip

Best regards,
Haneef

Administrator [Syncfusion]
Replied On February 8, 2007 08:47 PM

It's a gridControl, and that is exactly what I'm doing. But the 20 rows of data are also saved and loaded. I want to load the grid layout, and then fill it with new data.

Mark C

Administrator [Syncfusion]
Replied On February 9, 2007 05:42 PM

Hi Mark,

There is no built-in way of doing this. The two methods for saving/restoring GridControl state (LoadBinary/SaveBinary and LoadSoap/SaveSoap) automatically save the values as part of the GridStyleInfo objects. You could write your own routines to save explicitly the items you want to persist (it would be straight forward as the persistence is really handled by the .NET Framework methods.) . Here is a sample http://www.syncfusion.com/support/user/uploads/savegrid.zip that will save the order and size of columns in a GridDataBoundGrid. You could add additional information in the same manner. You could also use a SoapFormatter instead of the binary one. Or, you could just save an XML file directly.

Best regards,
Haneef

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;