Set Kendo Grid POPUP editor values using Jquery

asp.net-mvc, jquery, kendo-grid, kendo-ui

Solution

Value set directly on editor pop-up / templates from jquery for some old reasons is not updating the model. I also faced the same issue, below is my solution.

var uid = $(".k-edit-form-container").closest("[data-role=window]").data("uid"),

model = $("#myGrid").data("kendoGrid").dataSource.getByUid(uid);

model.set("FirstName", "my name");

Do let me know if this is not what you were looking for!

Problem

I'm using Kendo Grid with POPUP editing. On edit POPup I'm having a textbox like below. ``` @Html.TextBoxFor(model => model.FirstName, new { style = "width:175px" }) ``` Then I set this textbox value using Jquery ``` $("#FirstName").val("my name"); ``` When I submit the popup to save the values it does not pass these values to controller. However, if I type a value on the textbox, then it works fine. Why is it not working with the values set through Jquery?

Original source