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

[Solved] Look in different directory for popup editor templates.

3 Answers 592 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chrys
Top achievements
Rank 1
Chrys asked on 18 Apr 2013, 08:03 PM
Is there a way to change the directory for which a kendo grid looks for popup editor template in an mvc project? Right now my grids only see the ones in editor templates folder in under the shared directory. Which works but it doesn't do anything for keeping my project organized.

3 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 19 Apr 2013, 08:08 AM
Hello Chrys,

 Kendo UI Complete for ASP.NET MVC relies on Html.EditorFor to determine the editor template. As far as I know the latter doesn't support different directories than EditorTemplates in ~/Views. If you find a way to modify the Html.EditorFor behavior Kendo UI Complete for ASP.NET MVC would use it.

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Accepted
Chrys
Top achievements
Rank 1
answered on 19 Apr 2013, 01:55 PM
You can accomplish this by creating multiple EditorTemplates under you view folder for the controller. If you are using the templates just for views of one specific controller then you place an EditorTemplates folder under that View folder i.e under Views\Planning\ I would put a new folder EditorTemplates and put my editor templates in there. Making the location of my templates Views\Planning\EditorTemplates\MyTemplate.cshtml. The grid will look in the EditorTemplates of the planning views folder first then to the shared folder if it doesn't find the specified template.
0
Elia
Top achievements
Rank 1
answered on 19 Oct 2014, 02:39 PM
Many thanks Chrys, that was exactly what I was looking for :-) Thought before all EditorTemplates have to be located in the Views/Shared folder which then ends in a messed folder...
Tags
Grid
Asked by
Chrys
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Chrys
Top achievements
Rank 1
Elia
Top achievements
Rank 1
Share this question
or