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

Is there a way to find out if the current text is in the listbox

Thread ID:

Created:

Updated:

Platform:

Replies:

6674 Aug 22,2003 01:30 AM UTC Aug 26,2003 12:58 PM UTC Windows Forms 1
loading
Tags: Tools
Peter
Asked On August 22, 2003 01:30 AM UTC

Using the comboboxext is there a way to find out if the text currently in the textbox also in the listbox without having to enumerat through each item? For example i have a comboboxext in which you can select an item in the combobox or type your own in. if the item typed in is not in the comboboxext then i need to get some user input to configure the new item. before all i had to do was if (comboBoxExt1.ListControl.SelectedIndex == -1) { // item is not in listcontrol. // configuration code here } now with the newest version it is no longer the case. What is another way to do this? TIA, Peter

Administrator [Syncfusion]
Replied On August 26, 2003 12:58 PM UTC

Hi Peter, Sorry for the delayed response. This can be accomplished by adding the following code in the ComboBoxBase Validating event handler. this.comboBoxBase1.UpdatePopupControl(); Please refer to the code sample attached. Regards, Guru Patwal.

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

;