We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Autocomplete SelectedValue doesn't updating

I have this autocomplete mvvm implementation using prism library:

        <syncfusion:AutoComplete Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="2" Source="Custom" IsFilter="True"
                                 CustomSource="{Binding Path=Occupations}" 
                                 SelectedValue="{Binding Path=Contact.OccupationId}"
                                 SelectionMode="Single" SelectedValueChanged="AutoComplete_OnSelectedValueChanged"
                                 DisplayMemberPath="Name" SelectedValuePath="Id">

So i double click a record on a datagrid and then comes the contact edit view that this control lives.
The problem is that the selected value is not correct. For example for an occupation with id 12 it selects an occupation with id 14.
The strange thing is that by adding some breakpoints in code, eg on viewmodel's contructor, it selects the correct value.
Also noticed, on AutoComplete_OnSelectedValueChanged, that the NewValue, during the loading is getting, several times, the occupation object instead of occupationid.

2 Replies

DS Demetrios Seferlis January 27, 2017 08:06 PM UTC

I'm sorry for bothering anyone but found solution looking at the forum. I had to set EnableSorting="False" for this to work as expected.
Is there any plan for fixing this?

PB Priyanga Balasubramaniam Syncfusion Team January 30, 2017 12:07 PM UTC

Hi Demetrios,

Thank you for contacting Syncfusion Support.

We have prepared the sample using your code sample. In this we could not reproduce the issue and Selected value is correct in this sample. Can you please check whether you could reproduce the issue with below sample? If the issue is not reproduced with attached sample, please update more information like issue reproducing sample.


Priyanga B 

Live Chat Icon For mobile
Up arrow icon