Standard grid filtering options done as shown in this demo page: http://demos.telerik.com/aspnet-mvc/grid/filter-menu-customization
But it doesn't work. Here is my grid:
@(Html.Kendo().Grid<
UserModel
>()
.Name("Items")
.DataSource(dataSource => dataSource
.Ajax()
.Destroy(delete => delete.Action("DeleteGridItem", @ViewContext.RouteData.Values["controller"].ToString()))
.PageSize(25)
.Update(update => update.Action("Save", @ViewContext.RouteData.Values["controller"].ToString()))
//.ServerOperation(true)
.Sort(sort => sort.Add("Name"))
.Read(read => read.Action("LoadGrid", @ViewContext.RouteData.Values["controller"].ToString())))
.ToolBar(tools =>
{
tools.Custom().Text("Clear Filter").HtmlAttributes(new { id = "gridAllFilterReset" });
tools.Excel().Text("Excel");
})
.Excel(excel => excel
.AllPages(true).FileName($"{ViewContext.RouteData.Values["controller"].ToString()}.xlsx").Filterable(true)
)
//.EnableCustomBinding(true)
.Columns(columns =>
{
columns.Bound(x => x.Name);
columns.Bound(x => x.Email);
columns.Bound(x => x.Departments);
columns.Bound(x => x.Titles);
columns.Command(command =>
{
command.Custom("Edit").Text("<
span
class
=
'k-icon k-edit'
></
span
>").Click("editRecord");
command.Destroy().Text(" ");
}).Width(250);
})
.Filterable(f => f.Operators(o => o.ForString(x => x
.Clear()
.Contains("Contains")
.IsEqualTo("Is Equal To")
.StartsWith("Starts With")
.EndsWith("Ends With")
.DoesNotContain("Does Not Contain")
.IsNotEqualTo("Is Not Equal To")
.IsEmpty("Is Empty")
.IsNotEmpty("Is Not Empty"))))
.Sortable(x => x.AllowUnsort(false))
.Pageable()
.Deferred()
)
But when I load the grid, the default filter options for string still apply
@(Html.Kendo().Grid(Model.Profile.CollectionOption)
.Name("colOptions")
.Columns(columns =>
{
columns.Bound(p => p.Id).Hidden();
columns.Bound(p => p.ModuleId).Hidden();
columns.Bound(p => p.Module.Name).Title("Modulo");
columns.Bound(p => p.Name).Title("Opcion");
columns.Bound(p => p.Selected).Title("Seleccionar").ClientTemplate("<input type='checkbox' #= Selected ? checked='checked' :'' # />"); ;
}
)
.Editable(editable => editable.Mode(GridEditMode.InCell))
.DataSource(dataSource => dataSource
.Ajax()
.Model( m =>
{
m.Field(p => p.Id).Editable(false);
m.Field(p => p.ModuleId).Editable(false);
m.Field(p => p.Module.Name).Editable(false);
m.Field(p => p.Name).Editable(false);
m.Field(p => p.Selected);
}
)
.ServerOperation(false)
)
)
I've just started an ASP.NET core project, and installed the UI for ASP.NET core library from the nugget package and added in the scripts and styles folder.
This seems all to be working (I can display a datepicker on the home view).
However, when clicking the add controller context menu, I now get the Telerik Add Scaffold dialog box, which does not have an option for a plain controller (screen shot attached).
When I choose the UI for MVC Grid option, I'm unable to choose a dataContext class, even though one exists (using EntityFramework Core).
Is there a way to localize the apply button or to access to the text of the Apply button ? (and cancel of course)
I'm using Asp.net Core MVC application with Kendo.MVC 2016.2.617 version.
Best regards
Basically I need to set the width of the input role="listbox" class="k-textbox" to 100% because it is wider than the widget.
Any help?
I love the elegance of the new tag helpers, but the jQuery code itself is running inline on the widget which forces me to load jQuery\kendo at the top of the page
Is there a way to change where the script markup is generated\rendered?