This is a migrated thread and some comments may be shown as answers.

RadAutoCompleteBox and doubleclick

1 Answer 78 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Giovanni
Top achievements
Rank 1
Iron
Iron
Iron
Giovanni asked on 23 Nov 2012, 02:26 PM
Hi,
I'm trying to use RadAutoCompleteBox with AutoCompleteMode=Suggested (see the Telerik demo application).
It works fine, but if I do a double click on a suggested item it will be inserted in the textbox 2 times, the first as element and the second as simple text.
Is this a known issue of the control?
Is there any way to fix it?

Thank you.

1 Answer, 1 is accepted

Sort by
0
Accepted
Svett
Telerik team
answered on 27 Nov 2012, 02:08 PM
Hi Giovanni,

Thank you for writing.

I managed to reproduce the issue. I logged it in our public issue tracking system. It will be addressed in one of the next releases. Meanwhile, you should use the following work around:
public class MyRadAutoCompleteBox : RadAutoCompleteBox
    {
        public MyRadAutoCompleteBox()
        {
            this.ThemeClassName = typeof(RadAutoCompleteBox).FullName;
        }
 
        protected override RadTextBoxControlElement CreateTextBoxElement()
        {
            return base.CreateTextBoxElement();
        }
    }
 
public class MyRadAutoCompleteBoxElement : RadAutoCompleteBoxElement
    {
        protected override System.Type ThemeEffectiveType
        {
            get
            {
                return typeof(RadAutoCompleteBoxElement);
            }
        }
 
        protected override RadPopupControlBase CreateAutoCompleteDropDown()
        {
            return base.CreateAutoCompleteDropDown();
        }
    }
 
public class MyRadTextBoxAutoCompleteDropDown : RadTextBoxAutoCompleteDropDown
    {
        public MyRadTextBoxAutoCompleteDropDown(RadTextBoxControlElement element)
            : base(element)
        {
 
        }
 
        protected override void OnMouseUp(MouseEventArgs e)
        {
            if (!PopupManager.Default.ContainsPopup(this))
            {
                return;
            }
 
            base.OnMouseUp(e);
        }
    }

I updated your Telerik points.

Greetings,
Svett
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
Tags
AutoCompleteBox
Asked by
Giovanni
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Svett
Telerik team
Share this question
or