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
4160
UltraComboEditor: Limit to list or null
posted

Hello

How can I set the control, so that:

1) It auto-completes.
2) The completion is limited to the listed items.
3) If nothing is selected, the control can lose focus.

Thanks a lot.

Parents
  • 469350
    Verified Answer
    Offline posted

    Try something like this: 

     


            private void Form1_Load(object sender, EventArgs e)
            {
                this.ultraComboEditor1.AutoComplete = true;
                this.ultraComboEditor1.LimitToList = true;
               
            }

            private void ultraComboEditor1_ItemNotInList(object sender, Infragistics.Win.UltraWinEditors.ValidationErrorEventArgs e)
            {
                if (e.InvalidText == null ||
                    e.InvalidText.Length == 0)
                {
                    e.RetainFocus = false;
                }
            }

     

Reply Children