Hi
I am using databinding in my MVC view with ComboBoxFor (see sample below).
This works great when I am using this the first time (new record). However, when I want to Edit my entity, I want that upon opening the view, the ProductName is already there. How to accomplish this? If I set the .Text property then this is showed, but the binding gets lost when I save. Is there a way set force a call to the controller to get the ProductName based upon the bound MyProductId?
@(Html.Kendo().ComboBoxFor(m => m.MyProductID) .Placeholder("Select product") .DataTextField("ProductName") .DataValueField("ProductID") .HtmlAttributes(new { style = "width:100%;" }) .Filter("contains") .AutoBind(false) .MinLength(3) .DataSource(source => { source.Read(read => { read.Action("GetProducts", "Home"); }) .ServerFiltering(true); }) )