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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid.Binder in GDBG memory persistant?

Thread ID:





36965 Nov 14,2005 07:58 AM UTC Nov 14,2005 09:06 AM UTC WinForms 1
Tags: GridControl
Asked On November 14, 2005 07:58 AM UTC

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 09:06 AM UTC

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


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon