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

using GridList in user Control

Thread ID:





35749 Oct 7,2005 08:07 PM UTC Oct 7,2005 09:55 PM UTC WinForms 1
Tags: GridControl
Bill Brennan
Asked On October 7, 2005 08:07 PM UTC

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 09:55 PM UTC

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.


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