Hi,
I've a problem with filtering and sorting my grid. The Grid does not sort and filter my ViewModel-Properties.
View:
@(Html.Kendo().Grid<DepositModel>() .Name("gridClosedDeposits") .Columns(col => { col.Bound(p => p.Id) .Title(Resources.Resource.ID); col.Bound(p => p.DateTime) .Format("{0:dd.MM.yyyy hh:mm}") .Title(Resources.Resource.Date); col.Bound(p => p.User_Id) .Title(Resources.Resource.CustomerId); col.Bound(p => p.User.FirstName) .Title(Resources.Resource.FirstName); col.Bound(p => p.User.LastName) }) .Filterable() .Sortable() .Groupable() .Resizable(r => r.Columns(true) ) .Pageable(pageable => pageable .Refresh(true) .PageSizes(true) .ButtonCount(5)) .DataSource(dataSource => dataSource .Ajax() .Sort(sort => sort.Add("DateTime").Descending()) .Read(read => read.Action("GetClosedDeposits", "Grid")) .PageSize(10))GetClosedDeposits-Function:
public ActionResult GetOpenDeposits([DataSourceRequest]DataSourceRequest request){ using (var dbContext = new dbEntities()) { IQueryable<Deposit> deposits = dbContext .Deposit .Where(w => w.CanceledSmallDateTime == null && w.AccomplishedSmallDateTime == null); DataSourceResult result = deposits.ToDataSourceResult(request, s => new DepositModel { DateTime = s.DateTime, Id = s.Id, User_Id = s.User_Id, User = new UserModel { Id = s.User1.Id, FirstName = s.User1.FirstName.Split(' ')[0], LastName = s.User1.LastName, UserName = s.User1.UserName } } ); return Json(result); }}With the release version of Core, I am now getting this error on Kendo Grid Read Action.
TypeLoadException: Could not load type 'Microsoft.Extensions.DependencyInjection.ServiceProviderExtensions' from assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'Here is the top part of the Stack Trace:
System.TypeLoadException: Could not load type 'Microsoft.Extensions.DependencyInjection.ServiceProviderExtensions' from assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. at Kendo.Mvc.UrlGenerator.GetUrlHelper(ActionContext context) at Kendo.Mvc.UrlGenerator.Generate(ActionContext context, INavigatable navigationItem, RouteValueDictionary routeValues) at Kendo.Mvc.UrlGenerator.Generate(ActionContext context, INavigatable navigationItem) at Kendo.Mvc.UI.NavigatableExtensions.GenerateUrl(INavigatable navigatable, ViewContext viewContext, IUrlGenerator urlGenerator) at Kendo.Mvc.UI.Fluent.CrudOperationBuilderBase`1.SetUrl() at Kendo.Mvc.UI.Fluent.CrudOperationBuilderBase`1.Action(String actionName, String controllerName, Object routeValues) at Kendo.Mvc.UI.Fluent.CrudOperationBuilderBase`1.Action(String actionName, String controllerName) at AspNetCore._Views_Organisations_Details_cshtml.<>c.<ExecuteAsync>b__27_3(CrudOperationBuilder read) in /Views/Organisations/Details.cshtml:line 61I use UI for ASP.NET MVC Q2 2016.
I cannot figure out how to localize the edit and destroy button in the column command of my grid.
My app is using asp.net core rc2
I have include the localization feature using resource.
The default culture is en-US as stated in startup.cs
options.DefaultRequestCulture = new RequestCulture(culture: "en-US", uiCulture: "en-US");
In the Model I manage the localization with resources file "...en-US.resx"
public class TA_ACCESSORY_ACC
{
[MaxLength(ApplicationDbOperation.DM_SHORTTEXT, ErrorMessage = "idsMaxError")]
[Display(ResourceType = typeof(ApplicationResources),Name = "idsName")]
public string NAME_ACC { get; set; }
}
The column of the grid are well translated from french to English but the button command still remain in french.
Any help will be very appreciated.
Is there an easy way to use the toolbar.Create() and toolbar.Save() builders in the toolbar template.
I want to add a dropdown for filtering while maintaining the default buttons.
I see no way to get toolbar.Create() to send me it's rendered text to add to the template??
Basically I want to duplicate something like this demo http://demos.telerik.com/kendo-ui/grid/toolbar-template but still have the standard add/save buttons in the toolbar as well.
Hi,
I am new to Kendo and are trying to add a custom command to a grid.
I have been going over examples and this forum and found multiple examples that has the following:
columns.Command(command =>
{
command.Custom("Details").Text("Show Details").Action("Details", "Billing");
});
When I try to use this, I get the following error:
'GridCustomActionCommandBuilder<myModel>' does not contain a definition for 'Action' and the best extension method overload 'UrlHelperExtensions.Action(IUrlHelper, string, object)' requires a receiver of type 'IUrlHelper'
I then tried this example from http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/grid/configuration:
columns.Template(@<text>@Html.ActionLink("Edit", "Home", new { id = item.ProductID })</text>);
But get this error:
Cannot convert lambda expression to type 'string' because it is not a delegate type
Please can someone please help me with this.
I am using existing samples but don't know what is wrong.
Thank you

I have a ToolBar with a Click handler defined, and some items, kind of like below
Html.Inteum().ToolBar().Name(tab.Name).Events(events => events.Click("TabItem_Click")).Items(items =>{ items.Add().Type(CommandType.SplitButton).Text("blahblah").Url("someURL");}
function TabItem_Click(e) { e.preventDefault(); LoadPageAsync(e.target.data().button.options.url); return false;}What I'm hoping to do is to prevent navigation to a new page when you click on a button, and instead load that target up asynchrnously. But the navigation is never prevented. How do I keep the navigation from happening?
I have a grid that I initalize via the .NET wrapper. I can do the following:
columns.Bound(r => r.SampleColumn).ClientGroupHeaderTemplate("#= myFunction2(data, 50) #")But I can't do this:
columns.Bound(r => r.SampleColumn).Filterable(f => f.Cell(c => c.Template("#= myFunction1(data, 100) #")))I get a JS error. Any idea why? I would like to pass in an additional variable on the view.
In using the grid, with filterable (.Filterable(ftb => ftb.Mode(GridFilterMode.Row))), the icons and/or styles seem to be missing. I am using the CDN source for my includes:
<link href="~/Content/Site.css" rel="stylesheet" type="text/css" /> <link href="http://uilibrary.Vensure.com/Styles/reset.css" rel="stylesheet" type="text/css"> <script src="~/Scripts/modernizr-2.6.2.js"></script> <script src="~/Scripts/jquery-3.0.0.min.js"></script> <script src="http://kendo.cdn.telerik.com/2016.2.607/js/kendo.all.min.js"></script> <script src="http://kendo.cdn.telerik.com/2016.2.607/js/kendo.web.js"></script> <script src="http://kendo.cdn.telerik.com/2016.2.607/js/kendo.aspnetmvc.min.js"></script> <link href="http://kendo.cdn.telerik.com/2016.2.607/styles/kendo.common.min.css" rel="stylesheet"/> <link href="https://kendo.cdn.telerik.com/2015.3.1111/styles/kendo.metro.min.css" rel="stylesheet"> <link href="https://kendo.cdn.telerik.com/2015.3.1111/styles/kendo.dataviz.min.css" rel="stylesheet"> <link href="https://kendo.cdn.telerik.com/2015.3.1111/styles/kendo.dataviz.metro.min.css" rel="stylesheet">Can you tell me what, if anything, am I missing from these? Because the filterable missing icons and other UI elements makes the screen thus far look pretty ugly.
Also, when clicking on the filterable boxes, which should show dropdowns for filter criteria (Starts With, Contains, etc...) all I get instead is a javascript error: Uncaught TypeError: f.getClientRects is not a function
The error appears to be thrown by jquery, of which you'll see I am using version 3.0.0.
Any help, suggestions, or advice would be greatly appreciated.
Hi,
Is it possible to have two Edit buttons in a Grid, One for In-Line edit & another for Edit in Pop-Up mode. Thanks,