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

ComboBoxAdv.SelectedIndex changed behavior

Thread ID:





65911 Jul 27,2007 06:22 PM UTC Jul 31,2007 10:29 PM UTC WinForms 1
Tags: Tools
Terry Foster
Asked On July 27, 2007 06:22 PM UTC


I recently upgraded from to and noticed that some of my code does not work the same way it did before. I tracked it down to the ComboBoxAdv control. Basically, I had one of these controls on a modal form and when the form was closed, I would access the SelectedIndex property to see what the user selected in the ComboBoxAdv control. Previously, this worked fine, but now it seems to be maintaining a 'm_beforeCreatedIndex' that is returned once the containing form is closed (because 'Created' = false). Is this intended behavior or bug? Seems strange to me that I shouldn't be allowed to access the correct SelectedIndex after the containing form closes (System.Windows.Forms.ComboBox allows this).


J.Nagarajan [Syncfusion]
Replied On July 31, 2007 10:29 PM UTC

Hi Terry,

Thanks for your interest in Syncfusion product.

If you want to know the selected Index of the comboboxAdv control when you close the form then you can use SelectedIndex property of comboBoxAdv control. You can handle the From Closing event. Please refer to the following code snippet

private void newToolStripMenuItem_Click(object sender, EventArgs e)
Form2 form2 = new Form2();

private void Form2_FormClosing(object sender, FormClosingEventArgs e)

I have attached the sample for your reference. You can download the sample from the following page.


Please refer to the sample and let me know if you have any questions.



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

or the page will be automatically redirected to 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