New to Telerik UI for ASP.NET MVC? Download free 30-day trial

Filtering

By default, the filtering functionality of the Telerik UI Grid for ASP.NET MVC is disabled.

Getting Started

To control filtering in the Grid, use the Filterable property.

    @(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.OrderViewModel>()
        .Name("Grid")
        .Filterable() // Enable the Menu filter mode.
        ...

Each Filterable configuration of the columns allows the setting of a custom DataSource.

    ...
    columns.Bound(e => e.LastName).Width(220).Filterable(ftb => ftb.Multi(true)
        .DataSource(ds => ds.Read(r => r.Action("Unique", "Grid").Data("{ field: 'LastName' }")))
    );
    .ShowIndexes(true))

Only columns bound to a field can be filterable. To enable filtering on a column bound to an object, bind the column to a field of that object.

Filter Modes

The Grid supports the following filter modes:

To set the desired filter mode, use the Filterable->Mode property. You can enable checkbox list filtering in the filter menu of the Grid component by specifying the Multi(true) setting for the relevant Grid columns.

    ...
    columns.Bound(p => p.UnitsInStock).Width(140).Filterable(ftb => ftb.Multi(true).CheckAll(true));

Filter Operators

See Also

In this article