how to use EditorTemplateName?

2 posts, 0 answers
  1. xu
    xu avatar
    17 posts
    Member since:
    Jul 2010

    Posted 27 Jun 2012 Link to this post

    it's not work,how to use EditorTemplateName?

    columns.Bound(u => u.RoleNameString).EditorTemplateName(


    <script type="text/javascript">

    function roles_editor()







  2. Robert
    Robert avatar
    38 posts
    Member since:
    Feb 2012

    Posted 29 Jun 2012 Link to this post

    EditorTemplateName points to an MVC EditorTemplate, not Javascript. If you want to use JS, you need to use a ClientTemplate for that.

    If you look at C:\Program Files (x86)\Telerik\Kendo UI for ASP.NET MVC Q2 2012 BETA\Examples\Views\Shared\EditorTemplates, you will see some example EditorTemplates that will override the default ASP.NET MVC templates with Kendo behaviors. You can add your own Template for a given model in that folder, and then EditorTemplateName would be the name of the file you want to use. In the case of the examples, you would use .EditorTemplateName("Time") or .EditorTemplateName("Currency").

    Let me know if that is not clear and I can see if I can point to a better example.
Back to Top