Ok so!
I am following a tutorial and the tutorial show how you can take an existing visual studio program and add Telerik to it.
Under the telerik menu option in visual studio I select Telerik UI for asp.net mvc then I select upgrade wizard.
Well silly me thought that the wizard after all its wizarding would add what I needed to my visual studio mvc project.
well well... I guess not. Gullible me thought something that we paid alot of money for would do what it claimed it would do.
NOPE!
Can some one tell when what is going wrong here...
I am adding a date time picker to a page. It does not work.
I did notice that the location that the wizard added was not in my actual file directory
where it is looking... so do I have to manually copy those files there??
Here is the source code:
The Razor index.cshtml page
@{
ViewBag.Title = "My Kiosk";
}
@(Html.Kendo().DatePicker().Name("Date").Value(DateTime.Today))
The Layout page for the mvc application there the link to the kendo stuff is:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=11,chrome=1">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - XXXXX</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
<link href="@Url.Content("~/Content/bootstrap.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/kendo/2020.2.617/jszip.min.js")"></script>
<script src="@Url.Content("~/Scripts/bootstrap.min.js")"></script>
</head>
<body>
Here are the errors I get on the the web browser
GET http://localhost:50296/Scripts/kendo/2020.2.617/jszip.min.js net::ERR_ABORTED 404 (Not Found)
bootstrap.min.js:6 Uncaught Error: Bootstrap's JavaScript requires jQuery at bootstrap.min.js:6
(anonymous) @ bootstrap.min.js:6
(index): 71
Uncaught ReferenceError: kendo is not defined at (index):71 (anonymous) @ (index):71
6 Answers, 1 is accepted
Also I added the following thinking it would help and now I get a new set of errors and the date picker still does not work... sigh :(
Added this web link <script src="https://kendo.cdn.telerik.com/2020.2.617/js/kendo.all.min.js"
My errors:
kendo.all.js:3802 Uncaught ReferenceError: jQuery is not defined
at kendo.all.js:3802
at kendo.all.js:3805
at kendo.all.js:26
at kendo.all.js:27
(anonymous) @ kendo.all.js:3802
(anonymous) @ kendo.all.js:3805
(anonymous) @ kendo.all.js:26
(anonymous) @ kendo.all.js:27
(index):72 Uncaught ReferenceError: kendo is not defined
at (index):72
(anonymous) @ (index):72
I have to ask does Telerik stuff really work or is it just some theory or side project that requires hours of trouble shooting... why is the documentation so poor?
Even the sample code does not work?
If any one has any ideas I am all ears and Eyes! Thanks Source Codes below!
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=11,chrome=1">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - AVRIS</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
<link href="@Url.Content("~/Content/bootstrap.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
@*<script src="@Url.Content("~/Scripts/kendo/2020.2.617/jszip.min.js")"></script>*@
<script src="https://kendo.cdn.telerik.com/2020.2.617/js/kendo.all.min.js"
<script src="@Url.Content("~/Scripts/bootstrap.min.js")"></script>
</head>
Guys this is so frustrating that the documentation is so poor...
I went to your demo site... https://demos.telerik.com/aspnet-mvc/datetimepicker
I mean really how about a real example like an actual solution file that shoes how a real mvc program is setup
You know like the Layout index and control.
The demo on that pages just shows me that who ever made that can get telerik to work but cannot explain to other people how they made it work... I cannot believe this stuff is this bad. I am pretty sure I am not doing something right but this in insanity!
Just trying to figure out how to use your product and posting my updates as Go along
Finally I am following this:
https://docs.telerik.com/aspnet-mvc/getting-started/first-steps?&_ga=2.146367091.614675501.1596817610-718987047.1595516622#add-the-telerik-nuget-feed-to-visual-studio
Step for states in the nuget package tool type this: Telerik.UI.for.AspNet.MVC
And of course nothing comes up...
Is this a cruel joke?? Is the documentation just all fake? What is going on here?
This get getting beyond silly. Nothing you all have written work as you state
There is nothing showing up related to Telerik.UI.for.AspNet.MVC"
WHat next???
Is there anyone manning these forums??? I can not get a datepicker to work/
I get the following errors
bootstrap.min.js:6 Uncaught Error: Bootstrap's JavaScript requires jQuery at bootstrap.min.js:6
(anonymous) @ bootstrap.min.js:6
( index):88 Uncaught TypeError: kendo.syncReady is not a function at (index):88
(anonymous) @ (index):88
Hello Christofer,
I am sorry to hear that you had such a troublesome experience with Kendo UI and the Telerik UI for ASP.NET MVC HTML helpers. I went through the steps in the article linked below, so please bear with me while I guide you on the process:
https://docs.telerik.com/aspnet-mvc/getting-started/first-steps
Before I start, please make sure you have configured the Private Telerik NuGet Feed configured. If you have checked the "set up Telerik NuGet package source" checkbox in the installer this would be configured automatically for you. Otherwise, you can follow the steps in the article below:
https://docs.telerik.com/aspnet-mvc/getting-started/installation/nuget-install
Once you have the Private feed configured, create a new ASP.NET MVC solution(or use an existing one) and open the NuGet Package Manager. Make sure you have selected the Telerik package source and then search for the Telerik.UI.for.AspNet.MVC package to install it:
Once that package has been added the styles and scripts will be added in the corresponding folders of the solution.
You can continue and add the client-side resources. you can either update the BundleConfig file to bundle and include the scripts and styles that were installed locally, or use the CDN. For the sake of the demonstration, I have added the CDN resources, as shown in the article:
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>@ViewBag.Title - My Telerik MVC Application</title>
<link href="https://kendo.cdn.telerik.com/2020.2.617/styles/kendo.bootstrap-v4.min.css" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/bootstrap.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
<script src="https://kendo.cdn.telerik.com/2020.2.617/js/jquery.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2020.2.617/js/jszip.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2020.2.617/js/kendo.all.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2020.2.617/js/kendo.aspnetmvc.min.js"></script>
<script src="@Url.Content("~/Scripts/bootstrap.min.js")"></script>
It is important to remove any other jQuery references in the _Layout.cshtml file as including multiple references of jQuery in the page will lead to the observed errors.
By default, newly created solutions have the following reference at the end of the page that needs to be deleted:
@Scripts.Render("~/bundles/jquery")
Then add the Kendo.dll as demonstrated and update the web.config file.
Finally, you can add the below code to the Index.cshtml file to initialize a DateTimePicker:
@(Html.Kendo().DatePicker().Name("Date").Value(DateTime.Today))
Following the above guide, you should be able to run a project without the reported JavaScript errors and use the Telerik UI for ASP.NET MVC Helpers. I have attached a basic sample created following the above steps, for you to review. If you need to review and debug the Demos locally note that a solution with all the runnable demos is part of the Telerik UI for ASP.NET MVC Distribution. Note also there is a Troubleshooting section that lists to commonly encountered issues and steps for their resolution.
I hope the above will help you add the Telerik UI for ASP.NET MVC package to your application. Should you have any further questions get back to me.
Regards,
Aleksandar
Progress Telerik