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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ComboBoxAdv

Thread ID:

Created:

Updated:

Platform:

Replies:

5835 Jul 18,2003 03:54 PM UTC Jul 19,2003 05:51 AM UTC WinForms 1
loading
Tags: Tools
Peter
Asked On July 18, 2003 03:54 PM UTC

Hi, I have a ComboBoxAdv with "dropdown" style. If I assign a value to the ComboBoxAdv.Text property which isn't one of the dropdown-items there comes up an exception and the textbox-text is set to the first item entry. Is there any way to prevent this and have the assigned value in the textbox? What I wanna do: I use the combobox for setting up filters on tables. If I have an optionfield with the possible values "test,test2,test3" I wanna be able to set a filter on "test OR test2". That means I choose the "test" item from the dropdownbox and type in " OR " and choose "test2" from the dropdownbox. All works fine because I overwrote some methods to get this behaviour. If a filter is set and I open the form to set some other filters I initialize the combobox with the currently set filter (in this sample "test OR test2". Now the exception is thrown and the text in the combobox is set back to "test". I hope you understand what I wanna do. Is there any way to do that? Regards, Peter

Peter
Replied On July 19, 2003 05:51 AM UTC

I got it: I did set the value before the form is loaded. If I set the value in the FormLoad event the combobox is initialized and the error do not occour. And I have to set the TextBox.Text and not the ComboBox.Text. Peter

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

;