I'm using a kendo grid popup editor. I have a custom template (partial view) for edit. I have a drop down and on change event, I'm populating a TextBox. The problem is when I am sending the model to the controller, the TextBox value is null. It's not updating the model with the populated value. Any idea why?
@(Html.Kendo().DropDownListFor(w => w.AddressID)
.DataTextField("Name")
.DataValueField("AddressID")
.DataSource(source =>{ source.Read(read =>{ read.Action("GetAddressType", "DataSource")
.Data("filterAddressTypes");})
.ServerFiltering(true);})
.CascadeFrom("CodeIDAddressType")
.Events(e => e.Change("addressSubType"))
)
@Html.TextBoxFor(model => model.AddressLine1)
On an AJAX done function, I'm populating the value.
$("#AddressLine1").val(response.AddressLine1)
I can see the new value in the text box but when submitted, it sends null to the controller. If I enter the value in the AddressLine1 field instead of populating, it sends the entered value to the controller.