@model Fab2ApprovalSystem.Models.Attachment @{ ViewBag.Title = "_DocumentAttachment"; } @(Html.Kendo().Grid() .Name("Attachments") .Columns(columns => { columns.Bound(a => a.AttachmentID).Visible(false); columns.Bound(l => l.IssueID).Visible(false); columns.Bound(l => l.FileName).Template(@ @Html.ActionLink(@item.FileName.ToString(), null)) .ClientTemplate("#=FileName#") .Title("Test"); columns.Bound(l => l.FullName); columns.Bound(l => l.UploadDate).Format("{0:MM/dd/yy hh:mm:ss}"); columns.Command(command => { command.Destroy(); }); }) .Sortable() .Scrollable() .HtmlAttributes(new { style = "height:150px; width:100%; font-size: 10px" }) .DataSource(dataSource => dataSource .Ajax() //.Batch(false) .ServerOperation(false) .Events(events => events.Error("error_handler")) .Model(model => { model.Id(p => p.AttachmentID); }) .PageSize(4) .Read(read => read.Action("Attachment_Read", "LotDisposition")) .Destroy(destroy => destroy.Action("Attachment_Destroy", "LotDisposition")) ) )
@(Html.Kendo().Upload() .Name("files") .Async(a => a .Save("AttachSave", "LotDisposition") .AutoUpload(true) ) .ShowFileList(false) .Events(events => events .Success("onSuccess") ) )