Completed
Last Updated: 09 Apr 2013 04:13 by Svetlin
Svetlin
Created on: 09 Apr 2013 04:13
Category: Editors
Type: Bug Report
1
FIX. Suggest behavior in RadAutoCompleteBox to support spaces in the written text.
Fix suggest behavior in RadAutoCompleteBox to support spaces in the written text.

WORKAROUND:
public class MyAutoCompleteBox : RadAutoCompleteBox
    {
        public MyAutoCompleteBox()
        {
            this.ThemeClassName = typeof(RadAutoCompleteBox).FullName;
        }

        protected override RadTextBoxControlElement CreateTextBoxElement()
        {
            return new MyAutoCompleteBoxElement();
        }
    }

 public class MyAutoCompleteBoxElement : RadAutoCompleteBoxElement
    {
        protected override Type ThemeEffectiveType
        {
            get { return typeof(RadAutoCompleteBoxElement); }
        }

        public override void CloseDropDown(RadPopupCloseReason reason)
        {
            if (reason == RadPopupCloseReason.CloseCalled)
            {
                if (this.ListElement.SuggestedText != null && this.ListElement.PatternText != null && this.ListElement.IsSuggestionMatched)
                {
                    return;
                }
            }

            base.CloseDropDown(reason);
        }

        protected override RadTextBoxListElement CreateListElement()
        {
            return new RadTextBoxListElement();
        }
    }
0 comments