'kendoMenu'

2 posts, 0 answers
  1. Charles
    Charles avatar
    11 posts
    Member since:
    Jun 2018

    Posted 01 Oct 2018 Link to this post

    My Kendo menu isn't playing nice.  I get this runtime error:

    Object doesn't support property or method 'kendoMenu'

    I've found references to taking out references to jquery in script inclusion, but trying that doesn't help.

     

    Here is my script refs in my _layout.cshtml: 

    @*@Scripts.Render("~/bundles/modernizr")*@<br>    @*<script src="~/Scripts/jquery-1.10.2.js"></script>*@<br>    <script src="~/Scripts/kendo.all.min.js"></script><br>    <script src="~/Scripts/kendo.menu.min.js"></script><br>    <script src="~/Scripts/kendo.aspnetmvc.min.js"></script>

     

    Here is my implemtation:

    @(Html.Kendo().Menu()

    .Name("Menu")
                              .Items(items =>
                              {
                                  items.Add().Action("Index", "Applications"); 

                              }));

    Advide?

  2. Rumen
    Admin
    Rumen avatar
    14075 posts

    Posted 03 Oct 2018 Link to this post

    Hi Charles,

    It looks like that the ~ tilde in the <script src="~/Scripts/kendo.all.min.js"></script> and other script tags is not resolved to the correct path and the js files did not get registered as explained in these forums: Why use @Scripts.Render(“~/bundles/jquery”) and Kendo projects and MVC bundling.

    You can see this documentation article on the topic: Bundling. For scripts you need to replace the StyleBundle with ScriptBundle.

    Best regards,
    Rumen
    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