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.

Grid.Binder in GDBG memory persistant?

Thread ID:

Created:

Updated:

Platform:

Replies:

36965 Nov 14,2005 02:58 AM Nov 14,2005 04:06 AM Windows Forms 1
loading
Tags: GridControl
Tomas
Asked On November 14, 2005 02:58 AM

I have a GDBG where I first retrieve a typed dataset from the db, add some columns manually that I need, and then finally bind it to the grid. After this I use Model.Cols.MoveRange() to move the columns around based on user settings. Now, my problem is that the first time I execute this code it works, but the second time it doesn''t because the Binder context seem to remember the columns an their "old" order. I have tried things like Model.ResetVolatileData() and Binder.InitializeColumns() without success. I even tried to call Binder.Dispose() still with the same result. Any ideas how I can initialize the grid to make it work just like the first time I execute the code?

Administrator [Syncfusion]
Replied On November 14, 2005 04:06 AM

Try creating a new GridBoundColumnsCollections object and populate this object with new GridBoundColumns in the order of their appearance. Then set this new GridBoundColumnsCollections object to the grid.GridBoundColumns property, and then call grid.Binder.InitialzeColumns. Here is a little sample that persists/restores the order of GridBoundBoundColumns to a binary file. It was done with an earlier version so, you should delete the MySizes.Bin file and change the references before building and running the sample. http://www.syncfusion.com/support/user/uploads/2862-1.zip

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.

;