Won't Fix
Last Updated: 22 Apr 2016 10:10 by ADMIN
ADMIN
Vladi
Created on: 26 Feb 2015 12:06
Category: AutoCompleteBox
Type: Bug Report
0
While the SelectedItem is not null setting it to null and then returning the SelectedItem causes the drop down of the control to be opened
While the SelectedItem is not null setting it to null and then returning the SelectedItem causes the drop down of the control to be opened

2 comments
ADMIN
Georgi
Posted on: 22 Apr 2016 10:09
The XAML team has recently reviewed this issue and will not be addressing it as at this time the team is focusing on the bugs impacting the highest number of developers. If you have encountered this issue and it is blocking for your work please contact us through the support ticketing system with details on your setup and a reference to this item.
ADMIN
Vladi
Posted on: 26 Feb 2015 12:25
The issue is observed when the SelectedItem of the control has a value, the SelectedItem is set to null and after that set again. When this is done in a single method in the code behind the issue is observed.

In order to workaround this issue all you need to do is wrap the resetting of the SelectedItem with a Dispatcher. The next code snippet shows the described approach:

The Xaml declaration of the control:

<telerik:RadAutoCompleteBox x:Name="AutoCompleteBox" .../>

and in the code behind:

var oldSelectedItem= this.AutoCompleteBox.SelectedItem;
this.AutoCompleteBox.SelectedItem = null;
Dispatcher.BeginInvoke(new Action(() =>
    {
        this.AutoCompleteBox.SelectedItem = oldSelectedItem;
    }));