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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Thread ID:





22663 Dec 17,2004 05:36 PM UTC Dec 20,2004 08:16 PM UTC WinForms 3
Tags: GridControl
Shankar Ramasubramanian
Asked On December 17, 2004 05:36 PM UTC

I would like to save grid col widths and grid column order of a syncfusion grid. I just used the example posted in http://www.syncfusion.com/Support/article.aspx?id=574. The preferences are saved when the user closed the form. I did it in Form closing event. The method works most of the time. But sometimes doesn''t work. When it doesn''t work, i check Model.ColCount it''s zero and datasource is nothing and GridBoundColumns is nothing. Everything is cleaned out. I think since form is closing, all resources and datastructres are cleared. I tried both form closing and form closed event. What''s the solution for this?

Administrator [Syncfusion]
Replied On December 17, 2004 10:33 PM UTC

I would have thought Form.Closing would work unless you are explicitly destroying the grid. You might try saving the grid in your Form''s Dispose override. protected override void Dispose( bool disposing ) { if( disposing ) { //save the grid here if (components != null) { components.Dispose(); } } base.Dispose( disposing ); }

Shankar Ramasubramanian
Replied On December 20, 2004 05:22 PM UTC

Clay, Thanks. Ideally, I would like to save the preference when form is closing, that is form closing event. My question is why should the databound grid release all the resources when form is not closed. Is this something windows form issue or syncfusion issue. thanks --shankar

Administrator [Syncfusion]
Replied On December 20, 2004 08:16 PM UTC

The only control that I can think of that may release a grid is a GridrecordNavigationControl or a TabBarSplitterWndControl. When you close a pane in one of these controls, a grid is destroyed. Are you using either of these controls to hold your grid? If you own the source ocde, you can use the Assembly Manager (Syncfusion Start menu) to build a debug version of the libraires, and then put a stop in the GridDataBoundGrid.Disposing method to try to spot exactly what might be dispsoing of the grid. If you upload a sample showing the problem, we can try to debug it here.


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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon