Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
524
Is there any way to edit ultracombobox with style-DropDownList?
posted

Hello,

          I am using UltraComboBox, with style-DropDownList. So that user has no permission to enter any value other than populated list (At runtime). But in my code there is code which is assigning the value, which is out of list. When I assign this value/item to text property of combobox , null string get assigned to combobox (as its style-DropDownList). Is there any way to edit ultracombobox with style-DropDownList..?

         Or, by keeping its style- DropDown, is there way to force the user to enter/ type the items which is exists in the list.

          Thank  you.

  • 469350
    Verified Answer
    Offline posted

    Hi,

    One thing you could do is add the item to the list before you set the value. You would, of course, have to add the item to the UltraCombo's DataSource, there's no way to add an item directly to the Combo itself.

    Another option might be to use the DropDownValidate style instead of DropDownList. This style allows the user to type, but it will raise an error and prevent the user from leaving the control unless the item is on the list. You can handle the ItemNotInList event to have more control over this process and make exceptions for certain values that may not be on the list.