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

NullReference Exception when closing simple docking application

Thread ID:

Created:

Updated:

Platform:

Replies:

19030 Sep 16,2004 08:01 AM UTC Sep 17,2004 03:29 AM UTC WinForms 2
loading
Tags: Tools
Urban Nilsson
Asked On September 16, 2004 08:01 AM UTC

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 10:15 AM UTC

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 17, 2004 03:29 AM UTC

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.

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

;