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.

NullReference Exception when closing simple docking application

Thread ID:

Created:

Updated:

Platform:

Replies:

19030 Sep 16,2004 04:01 AM Sep 16,2004 11:29 PM Windows Forms 2
loading
Tags: Tools
Urban Nilsson
Asked On September 16, 2004 04:01 AM

Hi! I''m using Syncfusion version 2.1.0.9. I get a NullReference Exception when I close my sample app. Here are some sample code: dockingManager1.DockControl(new TreeView(), this, Syncfusion.Windows.Forms.Tools.DockingStyle.Left, 150); dockingManager1.DockControl(new TreeView(), this, Syncfusion.Windows.Forms.Tools.DockingStyle.Left, 150); dockingManager1.DockControl(new TreeView(), this, Syncfusion.Windows.Forms.Tools.DockingStyle.Left, 150); If I close the application before focusing on any of the controls I get an exception. But if I select one of the controls before closing the app it works. If I put all three controls like tabs in one window I don''t get the error either. Thanks, Urban.

Administrator [Syncfusion]
Replied On September 16, 2004 06:15 AM

Hi Urban, This issue was recently reported by our customers who had installed the service pack1 for the .Net framework 1.1 and we are already working on fixing this issue. For now could you please use the following workaround : Handle the host form''s Closing event and explicitly dispose off all the controls associated with the DockingManager and the DockingManager itself. private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e) { IEnumerator ienum = this.dockingManager1.Controls; ArrayList dockedctrls = new ArrayList(); while(ienum.MoveNext()) dockedctrls.Add(ienum.Current); foreach(Control ctrl in dockedctrls) { this .dockingManager1.SetEnableDocking(ctrl, false); ctrl.Dispose(); } this.dockingManager1.Dispose(); } Please let me know how it goes. Thanks. Best regards, Stephen. >Hi! > >I''m using Syncfusion version 2.1.0.9. > >I get a NullReference Exception when I close my sample app. > >Here are some sample code: > >dockingManager1.DockControl(new TreeView(), this, Syncfusion.Windows.Forms.Tools.DockingStyle.Left, 150); > >dockingManager1.DockControl(new TreeView(), this, Syncfusion.Windows.Forms.Tools.DockingStyle.Left, 150); > >dockingManager1.DockControl(new TreeView(), this, Syncfusion.Windows.Forms.Tools.DockingStyle.Left, 150); > >If I close the application before focusing on any of the controls I get an exception. But if I select one of the controls before closing the app it works. > >If I put all three controls like tabs in one window I don''t get the error either. > >Thanks, Urban.

Urban Nilsson
Replied On September 16, 2004 11:29 PM

It worked! Thanks!

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.

;