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

Object reference not set to an instance of an object.

I am getting this error: ************** Exception Text ************** System.NullReferenceException: Object reference not set to an instance of an object. at System.Data.DataView.get_RowViewCache() at System.Data.DataView.GetElement(Int32 index) at System.Data.DataView.System.Collections.IList.get_Item(Int32 recordIndex) at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.listManager_ItemChanged(Object sender, ItemChangedEventArgs ea) The problem is that it only happens on a couple of user''s computers and never happens in my development environment. Have any of you seen this random error? I''m using Syncfusion Grid 2.0.2.0 Thanks

3 Replies

AD Administrator Syncfusion Team March 12, 2004 02:51 PM UTC

Try setting this property on teh grid to see if that affects this error. this.gridDataBoundGrid1.Binder.OptimizeListChangedEvent = true;


AD Administrator Syncfusion Team March 16, 2004 01:30 PM UTC

To add to the original post, I noticed that it only happens on computers that have >1 processor or are hyperthreaded. With hyperthreading on Syncfusion crashes within 2 min, but if I turn hyperthreading off in bios that syncfusion controls are flawless. Thanks, Max


AD Administrator Syncfusion Team March 16, 2004 02:30 PM UTC

If it is a threading issue, then the likely cause is some code is trying to access the grid from a thread that did not create it. Like all Windows Forms controls, instances of the grid is not thread safe. The control can only be accessed on the thread that created it. If you are on a thread that is different from the thread that created the grid, you need to call grid.Invoke to launch a delegate on the grid''s thread before working with the grid. Here is a KB link discussing this problem. http://www.syncfusion.com/Support/article.aspx?id=572 You also should be using a 2.0 version as that has some threading issues resolved in it.

Loader.
Live Chat Icon For mobile
Up arrow icon