I am using kendo grid in my view . How can i filter my data in the grid. my grid get data from a list in 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)
)
No i want to filter my grid on basis of the field Name . I tried
var datasource = new kendo.data.DataSource({
data: [{name: "sasdas"}],
filter: {
logic: "or",
filters:[
{ field: "Name", operator: "eq", value: "null" },
{ field: "Name", operator: "eq", value: "" }
]
}
});
what i am doing wrong here .
DatasourcetoDataSource. - DontVoteMeDown.DataSource(dataSource => dataSource)but creating a new one with different data. Can't get what you want to achieve here. - DontVoteMeDownDataSource'sFiltermethod within Razor? - Carsten FrankeDataSourceRequestto handle the paging, sorting, grouping, and column filtering. The Read method can be parameterized to deal with custom filtering. - Steve Greene