Hi I am getting the following error.
'Kendo is not defined'
I have bundelled and include the following in _layout.cshtml
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - My ASP.NET Application</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
@Styles.Render("~/Content/kendo/css")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/kendo")
@RenderSection("scripts", required: false)
</head>
and at the end body i have the following
@Scripts.Render("~/bundles/bootstrap")
The layout page it self looks ok , but when I display the partial view page with data. The grid data displays as a list but not as kendo grid view and the error shows kendo is not defined.
Thanks
Hi All,
I'm using Telerik UI for ASP.NET MVC R1 2021 licenced version and when customers doing some security test looks like some of Telerik instance codes can create Sql Injection attack possibility. Is it possible ? Is Telerik protect for Sql injection attacks?
One of usage example given below
public ActionResult GridTransactionBinding([DataSourceRequest]DataSourceRequest request)
{
if (Session["Username"] == null) { return View("404"); }
if (GetUserFleetId() != 0)
{
Load = GetLoadAmount();
}
return Json(Load.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
}
Thanks
I've just started a new project and used the latest release of the framework (v2022.3.1109). Unfortunately I've encountered some issues which didn't appear using earlier versions of the framework (pre R1 2022 I believe).
The problems are
Is there any documentation detailing the changes from R1 2022 and how to achieve these relatively simple appearance changes?
I'm using bootstrap 5 and the kendo.bootstrap-nordic.min.css css file.
Thanks
Hello,
I am trying to create new Telerik C# ASP.NET MVC Application using VSD version 2019. After project created, Under Reference folder system loaded Kendo.Mvc & System.Web.Mvc DLLs are added. System.Web.Mvc version 5.2.9.0. Kendo.Mvc version 5.2.7.0.
when I used @(Html.Kendo() - gives an below error
Warning CS1702 Assuming assembly reference 'System.Web.Mvc, Version=5.2.7.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' used by 'Kendo.Mvc'
matches identity 'System.Web.Mvc, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' of 'System.Web.Mvc',
you may need to supply runtime policy 3_Views_Home_Index.cshtml
Could you please help, how to get Kendo.Mvc using System.Web.Mvc version 5.2.9.0
Thanks in advance for help.
Raja
Hi,
I 'm using MVC5 and have a reference to the Kendo.MVC.dll assembly.
I've followed the instructions mentioned in below article.
http://docs.telerik.com/kendo-ui/aspnet-mvc/asp-net-mvc-5
I have just started using telerik control after installation but I am getting below compilation error.
CS1705: Assembly 'Kendo.Mvc, Version=2016.1.112.545, Culture=neutral, PublicKeyToken=121fae78165ba3d4' uses 'System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
Thanks,
Shital
i am getting the error when i use @html.kendo()
it showing are you missing any directives
>please suggest any solution
Hi,
I have a problem with kendo. Yesterday I've installed Kendo.MVC library from NuGet pagckages, do all the configurations established in the web regarding Kendo and Razor, and it just don seem to work.
Web.Config configuration:
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Optimization"/>
<add namespace="System.Web.Routing" />
<add namespace="Kendo.Mvc.UI" />
<add namespace="FNASystem" />
</namespaces>
</pages>
</system.web.webPages.razor>
In the index.cshtml file:
@(Html.Kendo().Menu()
.SecurityTrimming(false)
)
All the documentation that I found said that this should work, but the Kendo() function appears underline in red and with an error message that said "HtmlHelper<dynamic> does not contains a definition for 'Kendo' are you missing a using directive or a reference?", so, I do this In the index.cshtml file:
@using Kendo.Mvc.UI
@(Html.Kendo().Menu()
.SecurityTrimming(false)
)
But the @using Kendo.Mvc.UI part said "the using directive is not necesary, it previously appears in this namespace."
So, can yo help me with this issue?
Best regards
Hi, when i try and upgrade my telerik solution to the latest version via the Visual Studio extension in vs2022, i get the following error
System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.IO.Path.Combine(String path1, String path2)
at Telerik.VSX.Internal.ProjectManagement.ProjectFileLocator.GetProjectItemPathsRecursive(String projectItemName, ProjectItems projectItems, String pathSoFar, IList`1 accumulatedResults)
at Telerik.VSX.Internal.ProjectManagement.ProjectFileLocator.GetProjectItemPaths(String projectItemName)
at Telerik.VSX.Web.MasterPageProcessing.Locator.RazorMasterPageLocator.GetMasterPagePresent()
at Telerik.VSX.Web.MasterPageProcessing.ProjectSettingsReader.EnsureMasterPageDetectedInitialized()
at Telerik.KendoUI.Mvc.VSX.ProjectConfigurators.ProjectConfigurationTypeSelector.GetConfigureProjectPreWizardData(IScenarioDef template)
at Telerik.KendoUI.Mvc.VSX.ProjectConfigurators.ProjectConfigurationTypeSelector.ProjectConfiguration()
at Telerik.KendoUI.Mvc.VSX.ProjectConfigurators.StreamlinedProjectConfiguration.StartConfigureWizard()
at Telerik.VSX.VSPackage.PackageBase.CommandCallback(Object sender, EventArgs e)
The problem also occurs when i try the configure project option.
From what i can see there are 2 potential areas
1 - Our project has a fullstop in the project name ie [PROJECT].UI
This is part of our in house naming convention, but i don't know how the system would have worked with it before but not now
2 - We moved a lot of our scripts into a shared project, including the required kendo scripts / css, which hasn't been an issue, but maybe thats what might be causing this.
Any help would be appreciated.
A while ago I created a kendo.custom.min.js file for a project with the custom download builder. Unfortunately I did not make note of the options that were checked. Now I want to add a few Telerik controls to the project and create a new custom download file. Is there any easy to work backwards from a custom download file to find all of the options it contains?
Thanks
I'm using EditorTemple to populate dropdown while in edit mode. I have my editor template in the Views/Shared/EditorTemplates folder.
But when I press the Edit button it does nothing and shows a simple text box instead of a dropdown.
I'm using dynamic properties for binding instead of the view model, all the references I've looked at are based on the view model.
Is there any way to accomplish the same with dynamic property binding?
Here's my code of Grid:
@(Html.Kendo().Grid<object>()
.Name("Grid")
.AutoBind(true)
//.Events(ev => ev.Filter("setGridFilters").DataBound("setAutoFitColumn"))
.Columns(columns =>
{
columns.AutoGenerate(true);
columns.Bound("status").Title("Lead Status").Width(100).EditorTemplateName("LeadStatusList")
.Filterable(a=>a.Multi(true).Search(true).BindTo(new[] {
new{
status="None"
},
new{
status="Initial Call Scheduled"
},
new{
status="Working"
},
new{
status="Nurturing"
},
new{
status="Unqualified"
},
new{
status="Qualified"
}
}));
columns.Bound("ownerId").Title("Owner").Width(100).Filterable(a => a.Multi(true).Search(true).DataSource(ds => ds.Custom()
.Type("aspnetmvc-ajax")
.Transport(transport =>
transport.Read(read => read.Action("", "", new { field = "ownerId" }))
)
.Schema(schema => schema
.Data("names")
)));
columns.Bound("eventBookedC").ClientTemplate("<div title='#= title #'>#:getEventStatus(eventBookedC) #</div>").Title("Event Booked").Width(70)
.Filterable(a => a.Multi(true).Search(true).BindTo(new[] {
new{
eventBookedC="Null"
},
new{
eventBookedC="True"
},
new{
eventBookedC="False"
}
}));
columns.Command(command => { command.Edit();}).Width(150);
})
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Sortable()
.Filterable()
.Scrollable(sc => sc.Endless(true))
.Groupable()
.Resizable(resize => resize.Columns(true))
.Reorderable(reorder => reorder.Columns(true))
.ToolBar(e =>
{
e.Search();
e.Custom().Text("Create New").HtmlAttributes(new { id = "btnCreateNew", @class = "btn btn-primary" });
})
.Pageable(p => p.Numeric(false).PreviousNext(false).Refresh(true))
.Events(events => events
.Sort("onSorting")
.Filter("onFiltering")
.Group("onGrouping")
.Page("onPaging")
.GroupCollapse("onGroupCollapse")
.GroupExpand("onGroupExpand")
.DataBound("onDataBound")
.ColumnReorder("onColumnReordering")
.Edit("edit")
)
.DataSource(dataSource => dataSource
.Custom()
.Type("aspnetmvc-ajax")
.PageSize(500)
.ServerPaging(true)
.ServerFiltering(true)
.ServerSorting(true)
.ServerGrouping(true)
.Transport(transport =>
{
transport.Read(read => read.Action("", ""));
transport.Update(update => update.Action("", ""));
}
)
.Schema(schema => schema
.Data("data")
.Total("total")
.Model(m=>m.Id("id"))
)
)
)
Here's my editor template -> LeadStatusList.cshtml:
@using Kendo.Mvc.UI
@(Html.Kendo().DropDownList()
.Name("Status")
.DataTextField("Text")
.DataValueField("Value")
.BindTo(new List<SelectListItem>() {
new SelectListItem() {
Text = "None",
Value = "None"
},
new SelectListItem() {
Text = "Initial Call Scheduled",
Value = "Initial Call Scheduled"
},
new SelectListItem() {
Text = "Working",
Value = "Working"
},
new SelectListItem() {
Text = "Nurturing",
Value = "Nurturing"
},
new SelectListItem() {
Text = "Unqualified",
Value = "Unqualified"
},
new SelectListItem() {
Text = "Qualified",
Value = "Qualified"
}
})
.Value("1")
.HtmlAttributes(new { style = "width: 100%" })
)