Kendo control in EditorTemplate

4 posts, 0 answers
  1. Dina
    Dina avatar
    50 posts
    Member since:
    Feb 2012

    Posted 29 Apr 2017 Link to this post

    Is any way to access kendo controls in EditorTemplate?

    If I have

    @Html.Kendo().DropDownList().Name("Name1").HtmlAttributes(new { style = "width:100%;" })

    int EditorTemplate

    In Edit event of grid or inside EditorTemplate attempt to access kendo controls returns undefined value like

    $("#Name1").data("kendoDropDownList") is undefined.


    It undefined in edit event, it undefined anywhere I believe due to control is not being initialized yet.

  2. Viktor Tachev
    Viktor Tachev avatar
    2501 posts

    Posted 02 May 2017 Link to this post

    Hi Dima,

    Note that when defining an editor template the Name of the widget should correspond to the name of the field in the DataSource. 

    Alternatively you can use the [WidgetName]For format and remove the Name() property. In this case it will be set automatically.

    If you would like more information on editor templates you would find the article below interesting.

    Viktor Tachev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Steve
    Steve avatar
    21 posts
    Member since:
    Feb 2015

    Posted 19 Aug 2019 in reply to Viktor Tachev Link to this post


    That link is broken.


  4. Viktor Tachev
    Viktor Tachev avatar
    2501 posts

    Posted 21 Aug 2019 Link to this post

    Hello Steve,


    Thank you for letting us know. We added a redirect so resources pointing to the previous link can continue working as expected. You can see the actual location of the Editor Templates article in the link below:


    Regards, Viktor Tachev
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top