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.
Syncfusion Feedback

Cross-thread operation not valid exception for ComboBoxBase control.

Thread ID:

Created:

Updated:

Platform:

Replies:

61160 May 18,2007 05:10 AM UTC May 22,2007 11:53 PM UTC Windows Forms 1
loading
Tags: Tools
Ravi
Asked On May 18, 2007 05:10 AM UTC

Hi,

Following code is not working with Syncfusion 5.1 version. It works fine with 4.3 version. With 5.1 version i still get "Cross-thread operation not valid" after i handle it. Can you please suggest me regarding this.

private delegate void SetListBoxSelectedIndexCallback(int selectedIndex);
private void SetListBoxSelectedIndexProperty(int selectedIndex)
{
// InvokeRequired required compares the thread ID of the
// calling thread to the thread ID of the creating thread.
// If these threads are different, it returns true.
if (comboBoxBase.ListControl.InvokeRequired)
{
SetListBoxSelectedIndexCallback d = new SetListBoxSelectedIndexCallback(SetListBoxSelectedIndexProperty);
this.Invoke(d, new object[] { selectedIndex });
}
else
{
this.comboBoxBase.ListControl.SelectedIndex = selectedIndex;
}
}

Thanks,
-Ravi.

Murugan [Syncfusion]
Replied On May 22, 2007 11:53 PM UTC

Hi Ravi,

We regret for the inconvenience caused. Could please provide the following details to reproduce the issue as you mentioned?

1.When is the specified method SetListBoxSelectedIndexProperty called?
2.Are you using separate Thread to open the ParentForm?
3.Could you please provide us the sample that is having the issue?

The above details will help us to reproduce the issue and resolve the issue soon.

Thank you for your interest in Syncfusion products.

Regards,
Murugan P.S

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.

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

;