I want to use the MVC Kendo's controls like @Html.Kendo().TextBox()
and @(Html.Kendo().Grid
in my Sitefinity view. In the view I have added ScriptRef.JQuery
and ScriptRef.KendoWeb
as well as the StyleSheet's. In the ASP.NET MVC R3 2020 sample project I have used the DLL file Kendo.Mvc.dll wrappers as a reference in the Sitefinity. But when I run the application I am getting the error Uncaught TypeError: kendo.syncReady is not a function at Preview:1160
. Any help with code defined steps would very appreciated.
wrappers path reference in the Sitefinity
C:\Program Files (x86)\Progress\Telerik UI for ASP.NET MVC R3 2020\wrappers\aspnetmvc\Examples\MVC5\Kendo.Mvc.Examples\bin
view
@using Kendo.Mvc.UI
@Html.Script(ScriptRef.JQuery, "head", true)
@Html.Script(ScriptRef.KendoWeb, "head", true)
@Html.Section("jquery")
@Html.Section("kendo")
@Html.StyleSheet(Url.EmbeddedResource("Telerik.Sitefinity.Resources.Reference", "Telerik.Sitefinity.Resources.Scripts.Kendo.styles.kendo_common_min.css"), sectionName: "head", throwException: false)
@Html.StyleSheet(Url.EmbeddedResource("Telerik.Sitefinity.Resources.Reference", "Telerik.Sitefinity.Resources.Scripts.Kendo.styles.kendo_bootstrap_min.css"), sectionName: "bottom", throwException: false)
@Html.Kendo().TextBox().Name("customSearch")
Is this a widget view or a page template view?
If a widget view, you better remove these 2 sections:
@Html.Section("jquery")
@Html.Section("kendo")
Also, make sure your page view has a section called "head"
To prevent this error, you need to make sure that your kendo init code:
@Html.Kendo().TextBox().Name("customSearch")
is placed after the kendo/jquery js scripts.
Just inspect the source of your page and make sure the above is correct.