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

Windows Form ComboBoxAutoComplete and SetSelectedItem

Thread ID:





52789 Dec 4,2006 06:23 PM UTC Dec 6,2006 06:14 AM UTC WinForms 3
Tags: EditControl
Allen Foster
Asked On December 4, 2006 06:23 PM UTC

I am trying to set the selected item in a combobox autocomplete control but am having no success.

Can you point me to some code or a sample project that might show how to set the selected item (ala when a user restarts an app and wants to have the last item selected appear).

I have tried SetSelectedItem, SelectedIndex and SetSelectedValue with no success.


Anupama Roy [Syncfusion]
Replied On December 5, 2006 06:09 PM UTC

Hi Allen,

Thanks for your interest in Syncfusion products.

Do you mean that you would like to persist the value you selected before closing the form and would like to get that as the selected item in the Text field when the Form loads?

Kindly let me know if I have not understood your requirement.



Allen Foster
Replied On December 5, 2006 10:21 PM UTC

Yes, i'd like to persist the selected item and then, after populated the datasource for the autocompletecontrol, restore the selected item

Anupama Roy [Syncfusion]
Replied On December 6, 2006 06:14 AM UTC

Hi Allen,

You can make use of AppStateSerializer class in order to persist values.Please take a look at the sample attached and let me know if you have any difficulties to follow.


Sample shows the Loading and Saving of items under a button click event.Instead of this,you can use Form Load event and Form Closing event in order to Save and Load Selected items automatically.

Kindly let us know if this does not meet your requirement.

Best Regards,



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