hi, im using asp.net 5 with MVC 6 and i have 2 problem using GridEditMode.PopUp
----------------------------------------------------- view ----------------------------------------------------------------------------
@(Html.Kendo().Grid<Organization>() .Name("grid")
.Columns(columns => {
columns.Bound(p => p.Name).Title("Name");
columns.Bound(p => p.Email).Title("Email");
columns.Bound(p => p.Disabled).Title("Disabled").Width(120); columns.Command(command => { command.Edit(); command.Destroy(); }).Width(150); })
.HtmlAttributes(new { style = "height: 550px;" })
.ToolBar(toolbar => toolbar.Create().Text("Add"))
.Editable(editable =>{ editable.Mode(GridEditMode.PopUp); editable.TemplateName("Edit"); })
.Pageable( pageable => pageable .Input(false) .Numeric(false) ) .Filterable().Sortable().Scrollable() .Events(events => events.Edit("insertPopupCaption"))
.DataSource(dataSource => dataSource.Ajax().PageSize(11).Events(events => events.Error("grid_error"))
.Model(model => {
model.Id(p => p.Id);
model.Field(p => p.Name).Editable(false);
model.Field(p => p.Email).Editable(true);
model.Field(p => p.Disabled); })
.Create(update => update.Action("Create", "Organization"))
.Read(read => read.Action("GetAll", "Organization"))
.Update(update => update.Action("Update", "Organization"))
.Destroy(update => update.Action("Delete", "Organization")) ) )
-----------------------------------------------------------------------------------------------------------------------------------
Problems:
1- As you can see im using editable.TemplateName("Edit") but this template is never found in the path "/view/Organization/EditorTemplates/Edit.cshtml" the only way to make it works is using the template in the path "/view/Shared/EditorTemplates/Edit.cshtml" (i have seen projects with mvc5 and this problem never happens)
2- if i try to remove the tag editable.TemplateName("Edit"); tring to use the template by default, this template seems to dont have in account the model because the field NAME "model.Field(p => p.Name).Editable(false);" is set to as not edittable BUT IN THE POPUP IT CAN BE EDITTABLE...
Thanks for your help...