I am trying to create a search box for a kendoUI grid. I have been able to get a start on doing a search based on one field however I would like the value in my search box t
I think that you should say eq to fee or eq to fi if you want to match one of the two conditions.
I´ve slightly modified your fiddle to show it. If you type on the search box you will filter records matching either ProductName column or QuantityPerUnit.
//change event
$("#category").keyup(function () {
var val = $('#category').val();
$("#grid").data("kendoGrid").dataSource.filter({
logic : "or",
filters: [
{
field : "ProductName",
operator: "contains",
value : val
},
{
field : "QuantityPerUnit",
operator: "contains",
value : val
}
]
});
});
IMPORTANT: I have had to update jQuery version to 1.8.2 for making it work and just in case I have updated KendoUI, as well, to the latest version.