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

Exception at the time of refreshing grid.

Thread ID:





54050 Dec 28,2006 12:43 PM UTC Dec 29,2006 04:17 AM UTC WinForms 1
Tags: GridControl
Asked On December 28, 2006 12:43 PM UTC

Hi syncfusion team,

Iam using a syncfusion grid which will be auto refreshed periodically based on timer the event. Iam getting following exception after refreshing the grid some 'N' number of times. I believe the exception occurs because multiple threads are accessing the dataset at the same time. But I don't know how to fix the problem, can you please help me to figure out the problem.

Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: System.Data
at System.Data.Index.CompareRecords(Int32 record1, Int32 record2)
at System.Data.Index.IndexTree.CompareNode(Int32 record1, Int32 record2)
at System.Data.RBTree`1.RBInsert(Int32 root_id, Int32 x_id, Int32 position)
at System.Data.Index.InsertRecord(Int32 record, Boolean fireEvent)
at System.Data.Index.ApplyChangeAction(Int32 record, Int32 action)
at System.Data.DataTable.RecordStateChanged(Int32 record1, DataViewRowState oldState1, DataViewRowState newState1, Int32 record2, DataViewRowState oldState2, DataViewRowState newState2)
at System.Data.DataTable.SetNewRecordWorker(DataRow row, Int32 proposedRecord, DataRowAction action, Boolean isInMerge, Int32 position, Boolean fireEvent, Exception& deferredException)
at System.Data.DataTable.InsertRow(DataRow row, Int32 proposedID, Int32 pos, Boolean fireEvent)
at System.Data.DataRowCollection.Add(DataRow row)

NOTE: since it is a .NET Remoting application, and the grid populates the data from the database. The grid populates the latest data (other user can edit and save the data in the grid) from the database correctly most of the times and it throws above exception 1 in 50 times.


Administrator [Syncfusion]
Replied On December 29, 2006 04:17 AM UTC

Hi Ravi,

Anytime you try to access a method on one of the grids, are you checking grid.InvokeRequired to see if you need to invoke a delagate call on theh grid's thread to make sure you access teh grid on the proper thread?

Not doing this will cause problems such as you described. Here is a kb link discussing using threads. http://www.syncfusion.com/Support/article.aspx?id=572

If this is not what you are seeing, then if you can upload a sample project showing this problem, we can debug it here to see what might be going on.

Best Regards,


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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