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

'kendoMenu'

1 Answer 49 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Charles
Top achievements
Rank 1
Charles asked on 01 Oct 2018, 03:37 PM

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?

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 03 Oct 2018, 08:42 AM
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.
Tags
Menu
Asked by
Charles
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or