Uncaught Reference Error Kendo is not Defined

1 Answer 64 Views
Grid
Joshua
Top achievements
Rank 1
Iron
Joshua asked on 15 Jan 2025, 08:54 PM

Im getting this error whenever I try to add the Kendo grid into my project. I am using asp .netcore8 razor pages. I have followed the tutorials on how to install Telerik and thought I did so correctly. The working example directly from a Telerik tutorial project doesnt work in mine and produces this error, and I have all of the same Nuget packages, etc. The only difference is I have my setup in the Startup.cs file rather than Program.cs?

 

Ive attached my files.

 

Thanks!

1 Answer, 1 is accepted

Sort by
0
Ivaylo
Telerik team
answered on 20 Jan 2025, 11:14 AM

Hi Joshua,

Thank you for the attachments provided.

This error typically occurs when the Kendo UI library is not properly loaded or initialized before it is used in the JavaScript code. This means that the browser is trying to access Kendo UI components or functions, but it can't find the Kendo library. Could you attach the project_ViewImports.cshtml and _Layout.cshtml files, so we can verify that the project is configured correctly to use UI for ASP.NET Core? The configuration in the _Layout.cshtml should look something like this: 

<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://unpkg.com/jszip/dist/jszip.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2024.4.1112/js/kendo.all.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2024.4.1112/js/kendo.aspnetmvc.min.js"></script>
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/themes/10.0.1/default/default-ocean-blue.css">

Below, I am providing resources outlining the process for adding Kendo UI scripts to your project using various methods such as CDN, local files, or LibMan:

In the meantime, I have prepared a sample application where I am implementing a Kendo UI Grid with Cascading DropDownLists in Razor Pages. I would appreciate it if you could take a look and let me know if this project helps with the issue or if any changes are needed.

I hope this information is helpful.

Regards,
Ivaylo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid
Asked by
Joshua
Top achievements
Rank 1
Iron
Answers by
Ivaylo
Telerik team
Share this question
or