This is a migrated thread and some comments may be shown as answers.

Pop-Up Editor doesn't find editor template

3 Answers 371 Views
Grid
This is a migrated thread and some comments may be shown as answers.
AP
Top achievements
Rank 1
Iron
Iron
Veteran
AP asked on 11 Jun 2018, 07:22 AM

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

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 13 Jun 2018, 07:30 AM
Hello, Andrew,

Thank you for the details.

Based on the description I can assume that this is connected to the issue described here:

https://github.com/telerik/kendo-ui-core/issues/2527

If this it is the same please let me know, so I can add it or you can directly write in the issue saying that you have the same one as this will automatically increase its priority.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
AP
Top achievements
Rank 1
Iron
Iron
Veteran
answered on 13 Jun 2018, 07:40 AM

I did this this when searching for a solution, but my Editor Templates are in the standard location, within the view. I've attached a screenshot.

This shows the Index page of the Users Controller, with the EditorTemplates folder within that view - and the partial view doesn't get picked up by the grid, unless it is explicitly put in the TemplateName property.

 

0
Stefan
Telerik team
answered on 14 Jun 2018, 06:55 AM
Hello, Andrew,

After additional tests trying the replicate it the issue occurs in a standard application setup.

I will add this to the issue and raise in priority.

I also added some Telerik points for point to us this scenario.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
AP
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Stefan
Telerik team
AP
Top achievements
Rank 1
Iron
Iron
Veteran
Share this question
or