I've got a grid, using a pop-up editor. This works, but doesn't pick up the custom edit form in the EditorTemplatesfolder of the view.
The only way I can get it to work is to specify the full path in the TemplateName setting. I'm using version v2018.2.516.
@(Html.Kendo().Grid<PLCV_II.Models.PlcvuserList>()
.Name(
"grid"
)
.Events(e => e.Edit(
"onEdit"
))
.Columns(columns =>
{
columns.Bound(p => p.UserName).Title(
"User Name"
);
columns.Bound(p => p.FullName).Title(
"Full Name"
);
columns.Bound(p => p.SystemUser).Title(
"User"
);
columns.Bound(p => p.SystemAdmin).Title(
"Admin"
);
columns.Bound(p => p.SystemViewer).Title(
"Viewer"
);
columns.Bound(p => p.Banned).Title(
"Banned"
);
columns.Command(command => { command.Edit(); command.Destroy(); });
})
.ToolBar(toolbar => toolbar.Create())
.Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName(
"~/Views/Users/EditorTemplates/PlcvuserList.cshtml"
))
.Pageable()
.Sortable()
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.Model(m=>m.Id(p=>p.UserName))
.PageSize(15)
.Events(e => e.Error(
"error"
))
.Read(read => read.Action(
"RD_Users"
,
"Users"
))
.Create(a => a.Action(
"InsertUser"
,
"Users"
))
.Update(a => a.Action(
"UpdateUser"
,
"Users"
))
.Destroy(a => a.Action(
"DeleteUser"
,
"Users"
))
.Sort(s => s.Add(a => a.UserName).Ascending())
)
)
Thanks