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

Two Way Binding problem in AutoCompleteTextBox

1 Answer 69 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Manoj
Top achievements
Rank 1
Manoj asked on 09 Jul 2014, 07:21 AM
Hi support,
I am facing the problem with Auto Complete Box.I have just downloaded the latest trial version.I want to use two way binding feature.I have observed that It is working fine.But the problem is when I type in the box DisplayMemberPath binding has broken.I am attaching the Xaml and VM also.

<telerik:RadAutoCompleteBox SelectionMode="Multiple" x:Name="tokenControl"
                                            Grid.Row="7" Grid.Column="1" Grid.ColumnSpan="7" MaxHeight="100" Margin="0 5"
                                            ItemsSource="{Binding Source={x:Static local:Globals.Instance},Path=Users}"
                                            AutoCompleteMode="Suggest"
                                            DropDownItemTemplate="{StaticResource userDataTemplate}"
                                            TextSearchPath="DisplayName"
                                            DisplayMemberPath="DisplayName" SelectedItems="{Binding SelectedContacts,Mode=TwoWay}">
                    
                </telerik:RadAutoCompleteBox>

Property:-
  private List<Presentity> _SelectedContacts;
        public List<Presentity> SelectedContacts
        {
            get
            {
                return _SelectedContacts;
            }
            set
            {
                _SelectedContacts = value;
                NotifyOnPropertyChanged("SelectedContacts");
            }
        } 
Code For Selection:-
foreach (Recipient recipient in SelectedExistingTask.Recipients)
                    {
                        Recipient localRecipient = recipient;
                        Presentity user = Globals.Instance.Users.FirstOrDefault((p) => p.UserId == localRecipient.Id);
                        if (user != null)
                        {
                            users.Add(user);
                        }
                    }





















1 Answer, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 11 Jul 2014, 01:08 PM
Hi Manoj,

We are not sure we understand what exactly the issue is when using the DisplayMemberPath and TextSearchPath of the control. In the scenarios where the properties are bound to the same value or to different values there are no unexpected behaviors observed in the latest version of RadAutoCompleteBox control.

I recorded and attached to my response a short video showing how the scenario run on our side. Please let us know if we have missed something.

Regards,
Vladi
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
AutoCompleteBox
Asked by
Manoj
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Share this question
or