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.

Invoke or BeginInvoke cannot be called on a control until the window handle has been created

Thread ID:

Created:

Updated:

Platform:

Replies:

68158 Sep 10,2007 08:43 PM Sep 11,2007 10:19 AM Windows Forms 1
loading
Tags: Grouping
Haishi
Asked On September 10, 2007 08:43 PM

Let me try to explain what's going on:

I have a group grid bound to a custom data list and I have a separate thread updating the data list. Sometimes I need to rebind the grid to a different instance of the list (same type but different instance). To do this I'm resetting the DataSource of the gird:

grid.DataBindings.Clear();
grid.DataSource = m_SearchedList;

However, as this happens, the user may use "Refresh" menu on my tool bar to refresh the grid. The "Refresh" code is like following:

this.grid.Reinitialize();
this.grid.Refresh();

The problem is that I'll get this "Invoke or BeginInvoke cannot be called on a control until the window handle has been created" once a while. I guess this is because the Reinitialize (or Refresh) methods reconstructs some controls in the grid while other threads are trying to access them.

Any good suggestions on this?

Golda Rebecal [Syncfusion]
Replied On September 11, 2007 10:19 AM

Hi Stanley,

Please refer to the following KB article on how to use GridControl in a multithreaded application:
http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=78

Kindly let me know if this helps you.

We appreciate your interest in Syncfusion products.

Best regards,
Golda

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.

;