Hi,
I'm facing an issue with popup of a Kendo MVC grid.
The Popup renders a custom "EditData.cshtml" view which is under the following folder structure--> Views/My/EditorTemplates/EditData.cshtml
But if I move the EditorTemplates folder to another folder say "controls" (eg; Views/My/Controls/EditorTemplates/EditData.cshtml), the EditData.cshtml template view is not found by the pop-up and renders the default popup.
The "EditData.cshtml" is also found if I move the Editortemplates folder to the Shared folder (Shared/EditorTemplates/EditData.cshtml).
I want to place the EditorTemplates under the Controls folder in this structure --> Views/My/Controls/EditorTemplates/EditData.cshtml
Any help would be highly appreciated:
Below is the sample Grid :
@(Html.Kendo().Grid<MyViewModel>()
.Name("aliasGrid")
.Columns(columns =>
{
columns.Bound(c => c.AccountNumber).Title("Account No").Width(30);
columns.Bound(c => c.Identifier).Title("Identifier").Width(40);
columns.Bound(c => c.Name).Title("Alias Name");
columns.Bound(c => c.Status.DisplayName).Title("Status/Reason");
columns.Template(@<text></text>).ClientTemplate(@"<a class='k-grid-edit' ><u>Edit</u></a>").Title("Action");
})
.Editable(x => x.Mode(GridEditMode.PopUp).TemplateName("EditData").Window(y=>y.Animation(false))) //rendering a view from the EditorTemplates folder
.Groupable()
.Sortable()
.Filterable()
.Pageable(pageable => pageable
.Refresh(true)
.PageSizes(true)
.ButtonCount(5))
.Events(e => e.Edit("CheckAccess"))
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("GetData", "My").Data("GetMemberNo"))
.Update(update => update.Action("UpdateData", "My"))
.PageSize(10)
.Model(model => model.Id(p => p.ID))
)
)