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
close icon

ObjectDisposedException

the following message is printed multiple times during the execution of the application.
and I cannot find the cause, could you help ?

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'GridDataBoundGrid'.
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at Syncfusion.Windows.Forms.ReflectScrollBar.UpdateScrollInfo()
at Syncfusion.Windows.Forms.ReflectScrollBar.Syncfusion.Windows.Forms.IScrollBar.UpdateScrollInfo()
at Syncfusion.Windows.Forms.ScrollBarWrapper.InitScrollBar()
catched at Syncfusion.Windows.Forms.ScrollBarWrapper.InitScrollBar() in :line 0
catched at Syncfusion.Windows.Forms.ScrollBarWrapper.InitScrollBar() in :line 0
System.ObjectDisposedException: Cannot access a disposed object.


2 Replies

SR Sri Rajan Syncfusion Team May 29, 2008 11:33 AM UTC

Hi Alex,

Thank you for your interest in Syncfusion products.

The exception is thrown when an operation is performed on the disposed grid. Please check the IsDisposed method of the grid and accordingly handle the situation. For example, to clear the GridBoundColumns, you can follow the below code.


if(!this.gridDataBoudGrid.IsDisposed)
this.gridDataBoundGrid1.GridBoundColumns.Clear();


Is it possible for your to upload a minimal sample that reproduces this issue?. That will help us to analyze this issue further.

Please let me know if you have any further questions.

Best Regards,
Srirajan



AA aa May 29, 2008 01:49 PM UTC

thanks Srirajan
bug located and resolved


Loader.
Live Chat Icon For mobile
Up arrow icon