I'm using external search filter for kendo grid..
My code data source read function it will return json data
dataSource = new kendo.data.DataSource({
type : 'json',
transport : {
read: {
url: apiurl+"/customer/getCustomers",
dataType: "json",
type:"POST",
data:{'userID':userID}
}
},
});
My search function
var customerID = $("#customerID").val();
grid.dataSource.query({
page:1,
pageSize:10,
filter:{
logic:"and",
filters:[
{field:"uniqueID", operator:"contains",value:customerID},
]
}
});
The above code i have used for filter query
These below json response only i will receive
{"status":true,"code":1,"message":"Success","api":"getCustomers","result":{"customer":[{"customerID"
:11},.....]}
But the filter query not filter as per the condition..the filter always return all response data..not filters data ..ie if i search 5 in customer id field ..it returns everything
It's only occuring for json data response
Aucun commentaire:
Enregistrer un commentaire