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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Autocomplete SelectedValue doesn't updating

Thread ID:

Created:

Updated:

Platform:

Replies:

128545 Jan 27,2017 12:03 PM UTC Jan 30,2017 12:07 PM UTC WPF 2
loading
Tags: AutoComplete
Demetrios Seferlis
Asked On January 27, 2017 12:03 PM UTC

Hello.
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.
Thanks.

Demetrios Seferlis
Replied On 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?

Priyanga Balasubramaniam [Syncfusion]
Replied On 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.

Sample:AutoCompleteSample

Regards,
Priyanga B 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;