The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
When I click on a certain column in a Databound grid I get an "Object reference not set to an instance of an object." error in the OnPaint event. I have no code in this event. Any clue on why this is happening?
ADAdministrator Syncfusion Team November 15, 2004 09:16 PM UTC
Are you using multiple threads? If so, are you protecting calls into the grid using grid.InvokeRequired checks? Threading problems can manifest themselves in errore of this nature.
What kind of column is the problem column?
Can you post a sample project showing the problem?
Or, can you post a call stack from when the exception is thrown?
CTChris ThompsonNovember 16, 2004 12:11 PM UTC
Here is the call stack. I''ll work on getting an sample together.
Exception Source: Syncfusion.Grid
Exception Type: System.NullReferenceException
Exception Message: Object reference not set to an instance of an object.
Exception Target Site: OnPaint
---- Stack Trace ----
Syncfusion.Windows.Forms.Grid.GridControlBase.OnPaint(pe As PaintEventArgs)
C2R.CLINSight.Win32.exe: N 00535
System.Windows.Forms.Control.PaintWithErrorHandling(e As PaintEventArgs, layer As Int16, disposeEventArgs As Boolean)
C2R.CLINSight.Win32.exe: N 00196
System.Windows.Forms.Control.WmPaint(m As Message&)
C2R.CLINSight.Win32.exe: N 00500
System.Windows.Forms.Control.WndProc(m As Message&)
C2R.CLINSight.Win32.exe: N 00656
Syncfusion.Windows.Forms.ScrollControl.WndProc(msg As Message&)
C2R.CLINSight.Win32.exe: N 00517
Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(msg As Message&)
C2R.CLINSight.Win32.exe: N 00306
System.Windows.Forms.ControlNativeWindow.OnMessage(m As Message&)
C2R.CLINSight.Win32.exe: N 00010
System.Windows.Forms.ControlNativeWindow.WndProc(m As Message&)
C2R.CLINSight.Win32.exe: N 00187
System.Windows.Forms.NativeWindow.Callback(hWnd As IntPtr, msg As Int32, wparam As IntPtr, lparam As IntPtr)
C2R.CLINSight.Win32.exe: N 00047