Reputation: 297
I'm trying to use the 30 days trial telerik offers and i have some problem to make it work properly.
As far as i know i did everything that is required but i still have an error when trying to display the control:
This is the error i get in my browser (in the console tab)
TypeError: jQuery(...).kendoDropDownList is not a function
jQuery(function(){jQuery("#color").kendoDropDownList({"dataTextField":"Text","da...
Here are the script i have added in my layout view:
<head>
<meta charset="utf-8" />
<title>Index - My ASP.NET MVC Application</title>
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<meta name="viewport" content="width=device-width" />
<script src="/Scripts/jquery-1.8.2.js"></script>
<link href="/Content/site.css" rel="stylesheet"/>
<script src="/Scripts/modernizr-2.6.2.js"></script>
<link rel="stylesheet" href="/Content/kendo.common.min.css">
<link rel="stylesheet" href="/Content/kendo.silver.min.css">
<script src="/Scripts/kendo.web.min.js"></script>
<script src="/Scripts/kendo.aspnetmvc.min.js"></script>
<script src="/Scripts/kendo.all.min.js"></script>
</head>
All the .js and .css are correctly called, the telerik namespace is registered in my web.config file and the reference has been correcly added to the project. It seems there is a .js missing somewhere but i can't find which one... Thanks for your help
Upvotes: 3
Views: 7377
Reputation: 12846
This is the correct order:
<script src="/Scripts/jquery-1.11.2.min.js"></script>
<script src="/Scripts/kendo.all.min.js"></script>
<script src="/Scripts/kendo.aspnetmvc.min.js"></script>
Note that kendo.all.min.js
(or kendo.web.min.js
if you use it) needs to be loaded before kendo.aspnetmvc.min.js
. kendo.aspnetmvc.min.js
is always required if you use the MVC helpers.
The minimum required jQUery version for Kendo UI is 1.9.1, but it doesn't hurt to update to the latest 1.x version, if you need IE8 compatibility, or 2.x if you don't. See Supported jQuery versions.
Depending on which widgets you use you can use kendo.web, instead of kendo.all. See Pick the Right Combined Script Based on Your Project Type.
You can also create your own javascript using the custom download tool.
Upvotes: 4