Hello,
I have a grid with a Editor Template with one TextBox and a Upload Control (see Code)
in the Upload Control Client Event "Success" I want to set the filename to the TextBox Control - how to Access the TextBox Control in edit mode of the template from this Event?
@model string@using Kendo.Mvc.UI@Html.TextBoxFor(model => model, new { @class = "k-textbox" })@(Html.Kendo() .Upload() .Multiple(false) .Messages(m => m.HeaderStatusUploaded("Erfolgreich")) .Messages(m => m.Select("Word Dokument hochladen...")) //.HtmlAttributes(new { accept = "application/pdf" }) .Name("Wordvorlage1Upload") .Async(a => a .Save("Save", "Auszeichnungsart") .AutoUpload(true) ) .Events(events => events .Upload("onUpload") .Success("onUploadSuccess") ))the Javascript Events
function onUpload(e) { //var grid = $("#grid").data("kendoGrid"); //grid.saveChanges(); e.data = { Auszeichnungsart_ID: $("#Auszeichnungsart_ID").val() }; } function onUploadSuccess(e) { alert(e.files[0].name); here I want to set the TextBox value of the edit template
var grid = $("#grid").data("kendoGrid"); grid.dataSource.read(); }