uncaught ReferenceError: Kendo is not defined

1 Answer 599 Views
General Discussions
Guest10
Top achievements
Rank 1
Guest10 asked on 17 Jan 2023, 11:25 PM

Hi  I  am getting  the following error.

'Kendo is not defined'

I have  bundelled and include the following in _layout.cshtml

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title - My ASP.NET Application</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")
    @Styles.Render("~/Content/kendo/css")
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/kendo")
    @RenderSection("scripts", required: false)
</head>

and at the end body i have the following

  @Scripts.Render("~/bundles/bootstrap")
    @Scripts.Render("~/bundles/jqueryval")

 

The layout page it self looks ok , but when I display the partial view page with data. The grid data displays as a list but not as kendo grid view  and the error shows kendo  is not defined.

Thanks

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 20 Jan 2023, 04:02 PM

Hello,

There could be different reasons for this exception, for example:

1. Incorrectly loaded Kendo js files
2. A duplicate reference of jQuery either in the Layout or in one of the views.
3. The partial view is loaded in a view that uses a different layout, or doesn't use a layout at all.

Please post the content of:

  • the whole _Layout.cshtml
  • the BundleConfig.cs file
  • the partial view

Additionally, please provide more details on where exactly the partial view is displayed and how. For instance, if you are using the Partial Html helper:

@Html.Partial("MyPartialView") 
where is it used?

Regards,
Ivan Danchev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Guest10
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or