I have an edit view for a particular model. The view contains the following Kendo autocomplete control code:
The drop down auto complete is working. However, existing values on the model (Location property) are not bound to the control. When I open up an existing record in edit mode the autocomplete control is empty, even if the underlying Location property on the model has a value. How does this control handle binding?
@(Html.Kendo().AutoCompleteFor(model => model.Location).Placeholder("Please select a value") .Name("locationAutoComplete").BindTo((IEnumerable<LocationData>)ViewData["locationList"]) .DataTextField("Name")) //Specifies which property of the Product to be used by the autocomplete. ;
The drop down auto complete is working. However, existing values on the model (Location property) are not bound to the control. When I open up an existing record in edit mode the autocomplete control is empty, even if the underlying Location property on the model has a value. How does this control handle binding?