Completed
Last Updated: 22 Apr 2019 10:45 by ADMIN
ADMIN
Lance | Senior Manager Technical Support
Created on: 03 Nov 2017 17:35
Category: AutoComplete
Type: Bug Report
1
AutoComplete: Text value doesn't update
If you're binding AutoComplete's Text to a view model property, the initial value doesn't show. It only updates after the bound string is set after the control is loaded.

Repro:

VIEWMODEL
private string enteredText = "Hello World 1";
public string EnteredText
{
    get { return enteredText; }
     set { enteredText = value; OnPropertyChanged(); }
}

VIEW

<telerikInput:RadAutoComplete Text="{Binding EnteredText}" />



WORKAROUND

private void AutoComplete_OnNativeControlLoaded(object sender, EventArgs e)
{
    (BindingContext as ViewModel).EnteredText = "Hello World 2";
}
2 comments
ADMIN
Nasko
Posted on: 22 Apr 2019 10:45
Hello,

The status of the item is updated to "Completed" as this issue is not reproducible in RadAutoCompleteView. Please consider using RadAutoCompleteView as it is a replacement of RadAutoComplete and have in mind that AutoComplete will be removed from the suite soon. 
 
You can read about the differences between both components and how to migrate to the new RadAutoCompleteView in the kb article here: Replace AutoComplete with AutoCompleteView.
 
If you have any difficulties regarding this, please open a support ticket with more details on your scenario.
   
Regards,
Nasko
ADMIN
Lance | Senior Manager Technical Support
Posted on: 10 Jul 2018 15:42
Another available workaround (using v 2018.2.620) is to use TwoWay binding for the Text binding:

Example:

<telerikInput:RadAutoComplete Text="{Binding EnteredText, Mode=TwoWay}" />