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

Highlighted item left click

1 Answer 66 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Przemysław
Top achievements
Rank 1
Przemysław asked on 09 Oct 2014, 06:05 AM
I'm having a bit of trouble with this control - I'm creating a class based on it to enable specific method of loading items source, and its ok.
But when I type something the popup is shown and first of filtered items is highlighted. The problem is, that this item cannot be selected by left click, although right mouse button is selecting working. If I left click on another item - it will be selected, only the first one isn't working.

So, how can I change template or something, to force control to react to left mouse click on highlighted item?

1 Answer, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 09 Oct 2014, 08:45 AM
Hi Przemysław,

The explained issue can appear in a scenario where the control is not populated correctly. Whenever calling the Populate() method of the control you would need to firstly check whether the drop down is not opened. Please check the following code snippet and try it in you project:

private void RadAutoCompleteBox_GotFocus(object sender, RoutedEventArgs e)
{
    var radAutoCompleteBox = sender as RadAutoCompleteBox;
    if (!radAutoCompleteBox.IsDropDownOpen)
    {
        radAutoCompleteBox.Populate(radAutoCompleteBox.SearchText);
    }
}

Please let me know if this solves the issue you are facing - if it doesn't help I'll ask you to share some sample code and more details regarding the scenario, so we can reproduce it on our side.

I'm looking forward to hearing from you.

Regards,
Kalin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
AutoCompleteBox
Asked by
Przemysław
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Share this question
or