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.
Unfortunately, activation email could not send to your email. Please try again.

Object Error in OnPaint

Thread ID:

Created:

Updated:

Platform:

Replies:

21593 Nov 15,2004 12:37 PM Nov 16,2004 07:11 AM Windows Forms 2
loading
Tags: GridControl
Chris Thompson
Asked On November 15, 2004 12:37 PM

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?

Administrator [Syncfusion]
Replied On November 15, 2004 04:16 PM

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?

Chris Thompson
Replied On November 16, 2004 07:11 AM

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

CONFIRMATION

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.

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.

;