I have implemented a Kendo grid in my view and I am looking to apply filters to the data displayed on the grid. The grid is populated from a list within my model.
@(Html.Kendo().Grid(Model.list)
.Name("listgrid")
.Columns(columns =>
{
columns.Bound(p => p.Name).Title("Name");
columns.Bound(p => p.status).Title("status");
})
.Sortable()
.Resizable(resize => resize.Columns(true))
.DataSource(dataSource => dataSource)
)
Specifically, I am trying to filter the grid based on the 'Name' field. I attempted the following:
var datasource = new kendo.data.DataSource({
data: [{name: "sasdas"}],
filter: {
logic: "or",
filters:[
{ field: "Name", operator: "eq", value: "null" },
{ field: "Name", operator: "eq", value: "" }
]
}
});
However, I seem to be missing something in my approach. Can anyone point out what I might be doing wrong here?