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

NullReferenceException when DataSource updates

Hi,

Attached is the Stack trace for a Nullreference Exception that is being thrown by my Syncfusion Grouping control.(.NET Framework version 1.1 Syncfusion version 3.2.1)

The exception is being thrown when new rows are added to my DataSource(not through the UI - a background process updates the Datasource and the UI needs to refresh accordingly)

The weird part about the error is that it is not happening on all machines ?! The grid works beautifully on all the old machines, but now the client purchased new laptops and all the new machines give this error? Can you perhaps tell me "when"/Why this exception will be thrown? I think it is something thats not correctly installed on the new machines, but would appreciate a pointer as to where to start looking!


System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Grouping.Record.get_RecordPreviewRows()
at Syncfusion.Grouping.Record.AdjustRecordRowCount()
at Syncfusion.Grouping.Table.InitGroups()
at Syncfusion.Grouping.Table.CategorizeElements()
at Syncfusion.Grouping.Table.OnEnsureInitialized(Object sender)
at Syncfusion.Grouping.Element.EnsureInitialized(Object sender, Boolean notifyParent)
at Syncfusion.Grouping.Table.EnsureInitialized(Object sender, Boolean notifyParent)
at Syncfusion.Grouping.Table.get_TopLevelGroup()
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.InternalGetFrozenRows()
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.FixTopLeftRowCol()
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.OnBeforePaint(EventArgs e)
at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg)
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.WndProc(Message& msg)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Regards.
Theo Danzfuss

1 Reply

AD Administrator Syncfusion Team August 24, 2006 06:21 PM UTC

Hi Theo,

It might occur due to the partial loading of the table. Try setting the TableDirty property to true after adding the new record. But we are not sure why it doesn''t work only in your new machines. Can you give us more information on this so that it helps us better solving your issues.

Let us know if this helps.

Best Regards,
Leo.

Loader.
Live Chat Icon For mobile
Up arrow icon