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

Text refresh issue

4 Answers 176 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Stefan
Top achievements
Rank 1
Stefan asked on 29 Jul 2020, 09:20 AM

Hi in our application we can enter on three different positions the same value via an autocomplete box. Unfortunately the Text is not align with all the other positions. I prepared a small example where you can test it. 

You can enter the value for Search Text in the Grid (via cell edit template) the First Tab and the Second tab at the bottom.You can see that if you enter similar text examples like Test, Test1, TestT and switch between them the value gets overwritten by the old value (First Tab: Test, Second Tab: Test1, Switch back to first tab => Test overwrites Test1) 

I hope you can reproduce this issue. We found a workaround at handling the binding at the lost focus event, but in my opinion this is a bug in the control. 

Thanks and Br,

Stefan

 

https://drive.google.com/file/d/1MEYAVatohcLog67PukJc2LHzXh_yvq4_/view?usp=sharing

 

 

4 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 03 Aug 2020, 06:47 AM

Hello Stefan,

Thank you for the provided project.

I think I was able to reproduce this. If I only type text in both controls, the SearchText property is synchronized as expected. But if I type text then select the suggestion from the dropdown, the SelectedItem property is set, which has a higher priority than the SearchText. I am not quite sure that this is an issue in the control or expected behavior. I will try to get deeper and also have a word with our development team regarding this. I need more time for that. I will get back to you in the next couple of days with my findings.

Regards,
Dinko
Progress Telerik

0
Dinko | Tech Support Engineer
Telerik team
answered on 06 Aug 2020, 11:44 AM

Hi Stefan,

Thank you for your patience.

I think I was able to find out the reason behind this. In the below code snippet, every time the SearchText is changing, the property changed method is called on the SearchSource property. In the getter of this property, the ToList() method is returning every time a new collection. I am not sure if this is necessary for your application, but you can remove and test it again.

public string SearchText
{
    get { return searchText; }
    set
    {
        searchText = value;
        NotifyPropertyChanged();
     //   MainViewModel.NotifyPropertyChanged(nameof(MainViewModel.SearchSource));
    }
}

 

Regards,
Dinko
Progress Telerik

0
Stefan
Top achievements
Rank 1
answered on 07 Aug 2020, 12:59 PM

Thanks for your reply. We we tried this but somehow this issue is still occurring in our application. I try again to create a scenario in the example application.

Br,

Stefan

0
Dinko | Tech Support Engineer
Telerik team
answered on 12 Aug 2020, 08:50 AM

Hi Stefan,

Please, take your time to isolate this behavior in a standalone project. I will be awaiting your reply whenever you can provide such so that I can assist you further. 

Regards,
Dinko
Progress Telerik

Tags
AutoCompleteBox
Asked by
Stefan
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Stefan
Top achievements
Rank 1
Share this question
or