Wednesday, June 22, 2016

Kendo UI Script references for ASP.NET MVC

I recently started working on a project using Kendo UI and I was encountering strange and unexpected behaviors when working with the Kendo UI Grid.

I was following the Kendo UI Demo application, but it provided very little insight as to how to set up a Kendo UI Razor MVC View from scratch: http://demos.telerik.com/aspnet-mvc/grid/index

As it turns out, the problems were originating from the order in which the Kendo UI scripts were being placed on the page!

This code sample for Kendo UI pointed out the problem: https://github.com/telerik/ui-for-aspnet-mvc-6-demos/blob/master/Kendo.Mvc.Examples/Views/Shared/_Layout.cshtml

As it turns out, the script file for kendo.all.min.js needed to be placed before kendo.aspnet.min.js!

That was all that was needed to fix my Kendo UI issue!!

No comments:

Post a Comment