I have a grid with a popup edit and I want to be able to upload file, update the current record then close the edit window. I'm calling the "Update button" trigger but that doesn't seem to work. Here's my code:
...
@(Html.Kendo().Grid<MyProject.Models.FileDetail>()
...
.Editable(editable =>
{
editable.Mode(GridEditMode.PopUp);
editable.TemplateName("template");
editable.Window(w => w.Title("file upload").Name("UploadWindow"));
})
.....
/*template.cshtml */
@model MyProject.Models.FileDetail
<div style="width: 400px">
<div>Title:</div>
<div>@Html.EditorFor(m => m.Title)</div>
@(Html.Kendo().Upload()
.Name("files")
.Events(e => e
.Success(@<text>
function() {
$(".k-grid-update").trigger('click');
}
</text>)
)
.Async(a => a.Save("Save", "Upload").Remove("Remove", "Upload").AutoUpload(false)
))
</div>
Thank you.
-Yai