This is a migrated thread and some comments may be shown as answers.

Gridview desposed during main thread invocation. Please help!!!

1 Answer 88 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Eyal
Top achievements
Rank 1
Eyal asked on 18 Oct 2012, 04:04 PM

 

I build a winform application with some grid-views, when I invoking anything (textboxes, the main form and more) I am getting exception: Object reference not set to an instance of an object.

I really don’t know what to do; we are in an advance project developing so replaceing the telerik components will not the best idea.

Any suggestions?

 

(see stack trace below)

   at Telerik.WinControls.UI.GridVirtualizedRowElement.DetachCells()

   at Telerik.WinControls.UI.GridVirtualizedRowElement.Detach()

   at Telerik.WinControls.UI.GridDataRowElement.Detach()

   at Telerik.WinControls.UI.GridRowElement.DisposeManagedResources()

   at Telerik.WinControls.DisposableObject.PerformDispose(Boolean disposing)

   at Telerik.WinControls.RadElement.PerformDispose(Boolean disposing)

   at Telerik.WinControls.DisposableObject.Dispose(Boolean disposing)

   at Telerik.WinControls.DisposableObject.Dispose()

   at Telerik.WinControls.RadElement.DisposeChildren()

   at Telerik.WinControls.RadElement.PerformDispose(Boolean disposing)

   at Telerik.WinControls.DisposableObject.Dispose(Boolean disposing)

   at Telerik.WinControls.DisposableObject.Dispose()

   at Telerik.WinControls.RadElement.DisposeChildren()

   at Telerik.WinControls.RadElement.PerformDispose(Boolean disposing)

   at Telerik.WinControls.DisposableObject.Dispose(Boolean disposing)

   at Telerik.WinControls.DisposableObject.Dispose()

   at Telerik.WinControls.RadElement.DisposeChildren()

   at Telerik.WinControls.RadElement.PerformDispose(Boolean disposing)

   at Telerik.WinControls.DisposableObject.Dispose(Boolean disposing)

   at Telerik.WinControls.DisposableObject.Dispose()

   at Telerik.WinControls.RadElement.DisposeChildren()

   at Telerik.WinControls.RadElement.PerformDispose(Boolean disposing)

   at Telerik.WinControls.DisposableObject.Dispose(Boolean disposing)

   at Telerik.WinControls.DisposableObject.Dispose()

   at Telerik.WinControls.RadElement.DisposeChildren()

   at Telerik.WinControls.RadElement.PerformDispose(Boolean disposing)

   at Telerik.WinControls.DisposableObject.Dispose(Boolean disposing)

   at Telerik.WinControls.DisposableObject.Dispose()

   at Telerik.WinControls.RadElement.DisposeChildren()

   at Telerik.WinControls.RadElement.PerformDispose(Boolean disposing)

   at Telerik.WinControls.DisposableObject.Dispose(Boolean disposing)

   at Telerik.WinControls.DisposableObject.Dispose()

   at Telerik.WinControls.ComponentThemableElementTree.Dispose(Boolean disposing)

   at Telerik.WinControls.RadElementTree.Dispose()

   at Telerik.WinControls.RadControl.Dispose(Boolean disposing)

   at Telerik.WinControls.UI.RadGridView.Dispose(Boolean disposing)

   at System.ComponentModel.Component.Dispose()

   at System.Windows.Forms.Control.Dispose(Boolean disposing)

   at System.ComponentModel.Component.Dispose()

   at System.Windows.Forms.Control.Dispose(Boolean disposing)

   at Telerik.WinControls.RadControl.Dispose(Boolean disposing)

   at System.ComponentModel.Component.Dispose()

   at System.Windows.Forms.Control.Dispose(Boolean disposing)

   at System.Windows.Forms.Form.Dispose(Boolean disposing)

   at Telerik.WinControls.UI.RadFormControlBase.Dispose(Boolean disposing)

   at Telerik.WinControls.UI.RadForm.Dispose(Boolean disposing)

   at Generic_EI.CELL_PC.Dispose(Boolean disposing) in C:\DevelopZone\TowerProjects\Fab1Automation\NEW_CELL_PC\Generic_EI\CELL_PC.Designer.cs:line 20

   at System.ComponentModel.Component.Dispose()

   at System.Windows.Forms.ApplicationContext.Dispose(Boolean disposing)

   at System.Windows.Forms.Application.ThreadContext.DisposeThreadWindows()

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 19 Oct 2012, 03:37 PM
Hi Eyal,

Thank you for contacting us.

Please note that all UI controls in WinForms and .Net framework are not thread safe. You should use the Invoke method when invoking UI control methods from different thread. If this is not the case, please send us your application and describe the exact steps to reproduce the issue. We will investigate it in detail and we will try to find the best option to solve the issue.

I am looking forward to your reply.
 
Kind regards,
Jack
the Telerik team
You’ve been asking for it and now it’s time for us to deliver. RadControls for WinForms Q3 2012 release is just around the corner. Sign up for a free webinar to see first all the latest enhancements.
Tags
GridView
Asked by
Eyal
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or