If you want to enable Server Filtering on Kendo Grid, first step is to tell Kendo that you want to enable that functionality because, by default, the data source performs filtering on client side.
|
var dataSource = new kendo.data.DataSource({ transport: { read: function (options) { var filter = options.data.filter; /* send the filter to the server*/ options.success(receivedDataFromServer); } }, serverFiltering: true }); |
On the server side you need to map Kendo Filter to a C# Filter class.
|
public class Filter { public string Field { get; set; } public string Operator { get; set; } public object Value { get; set; } public string Logic { get; set; } public IEnumerable<Filter> Filters { get; set; } } |