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.

using GridList in user Control

Thread ID:

Created:

Updated:

Platform:

Replies:

35749 Oct 7,2005 04:07 PM Oct 7,2005 05:55 PM Windows Forms 1
loading
Tags: GridControl
Bill Brennan
Asked On October 7, 2005 04:07 PM

I''m having a problem using the gridList in a user control. I adapted a very similar example to the grid List example with the states and images provided in the Grid list. It throws this exception: System.NullReferenceException: Object reference not set to an instance of an object. at Syncfusion.Windows.Forms.Grid.GridControlBase.OnPaint(PaintEventArgs pe) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs) at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg) at Syncfusion.Windows.Forms.Grid.GridControlBase.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) Is there an easy fix that I''m not seeing?

Administrator [Syncfusion]
Replied On October 7, 2005 05:55 PM

Are you trying to use multuple threads? If so, you need to make sure you do gridListControl.InvokeRequired checks before you try to access any GridListControl methods. Here is a KB link for the GridControl. It will be similar for a GridListControl (or any other Control derived class.) http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=78 If it is not a threading issue, then if you can upload a little sample showing the problem, we can try to debug it here.

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.

;