Completed
Last Updated: 10 Oct 2016 14:24 by Alan
ADMIN
Vladi
Created on: 04 Aug 2014 06:35
Category: AutoCompleteBox
Type: Bug Report
4
AutoCompleteBox: When the Populate method is called from the control's GotFocus or PreviewMouseLeftButtonDown events, moving the parent Window does not close it's DropDown
When the Populate method is called from the control's GotFocus or PreviewMouseLeftButtonDown events, moving the parent Window does not close it's DropDown.

Available in LIB Version 2016.3.1010, it will be also available in the 2016 R3 SP1.
5 comments
Alan
Posted on: 04 Mar 2016 21:02
The workaround worked for me in VB.NET when used as follows:
 
Dispatcher.BeginInvoke(New Action(Sub() auto.Populate("searchText")))
ADMIN
Nasko
Posted on: 15 Jan 2016 15:26
Another workaround is to called the Populate method from within a Dispather:
private void RadAutoCompleteBox_GotFocus(object sender, RoutedEventArgs e)
{
    var auto = sender as RadAutoCompleteBox;
    Dispatcher.BeginInvoke(new Action(() => { auto.Populate("searchText"); }));
}
Lisitsa
Posted on: 28 May 2015 15:37
Also, this bug happens even without calling Populate(). Steps to reproduce:
1) Click on AutoCompleteBox
2) Enter something so that dropdown should appear
3) Click at entered text
4) Move a window
Attached Files:
Lisitsa
Posted on: 28 May 2015 13:49
Thanks for the workaround, but this bug still needs to be fixed. How can I do this, when AutoCompleteTextBox is in UserControl, not Window?
ADMIN
Vladi
Posted on: 04 Aug 2014 06:58
Workaround:
Use the LocationChanged event of the parent Window instance and set the IsOpen property of any Popup instance related to the RadAutoCompleteBox to False. The next code snippet shows the described workaround:

In the XAML code:
<Window LocationChanged="OnWindowLocationChanged" ...>
      <telerik:RadAutoCompleteBox x:Name="AutoCompleteBox" .../>
</Window>
In the event handler:
private void OnWindowLocationChanged(object sender, EventArgs e)
{
    var popups = this.AutoCompleteBox.ChildrenOfType<Popup>();
    foreach (var popup in popups)
    {
        if (popup.IsOpen)
        {
            popup.IsOpen = false;
        }
    }
}