I am trying to create a Telerik Grid view but when I go to reference kendo it does not recognize it. Visual Studio is giving me an error when I try to reference kendo. This is t
For me, it was _ViewImports.cshtml
that I needed to edit
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Kendo.Mvc
@using Kendo.Mvc.UI
Now with asp.net core 2.2 the razor page is resolving the @(Html.Kendo()...
I just added the below line in razor page. Its working for me.
@using Kendo.Mvc.UI;
The problem is that you have not included a reference to the Kendo.Mvc.dll
. There's an explanation on how to do this in the documentation located here
By default the the root kendo directory is installed at C:\Program Files (x86)\Telerik
AddKendo.Mvc.dll
through NugetPackage and
Add Kendo.Mvc
Add Namespace in webconfig file
<system.web>
<pages>
<namespaces>
<add namespace="Kendo.Mvc.UI" />
</namespaces>
</pages>
Step1:
Add Kendo.Mvc.dll
to references.
You can use the following NuGet gallery command.
Install-Package Kendo.Mvc -Version {yourversion}
Step2: Add the js and css File of Kendo
<link href="@Url.Content("~/Content/kendo/2017.3.1018/kendo.common.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2017.3.1018/kendo.mobile.all.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2017.3.1018/kendo.dataviz.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2017.3.1018/kendo.default.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2017.3.1018/kendo.dataviz.default.min.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/kendo/2017.3.1018/jquery.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo/2017.3.1018/jszip.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo/2017.3.1018/kendo.all.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo/2017.3.1018/kendo.aspnetmvc.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.modernizr.custom.js")"></script>
Step3: Add the Kendo.Mvc.UI
namespace in web.config file.
note: if use the Area in Project you should add this code to web.config of Area.
<system.web>
<pages>
<namespaces>
<add namespace="Kendo.Mvc.UI" />
</namespaces>
</pages>
</system.web>
For those who are still facing the same issue, the following link is an updated blog for the latest versions of ASP MVC
Using Telerik in an Existing ASP MVC Project
For ASP MVC 4 Click here