var query = new Query();
//frame the query based on search string with filter type.
query = (e.text !== '') ? query.where('ShipCountry', 'startswith', e.text, true).addParams('additionalParams', '1') : query;
//pass the filter data source, filter query to updateData method.
e.updateData(this.remoteData, query |
public ActionResult UrlDatasource([FromBody]Data dm,string additionalParams)
{
var val = OrdersDetails.GetAllRecords(); |
methods: {
onFiltering: function(e) {
this.$http.get('https://ej2services.syncfusion.com/production/web-services/api/Employees', {params:{startingWith: e.text}}).then(function (response) {
var data = response.data;
this.remoteData = data.result;
},function (response) {
console.log(response.data)
});
} |
methods: {
onFiltering:function(e)
{
e.preventDefaultAction = true;
this.$http.get('https://services.odata.org/V4/Northwind/Northwind.svc/Customers', {params:{ startingWith: e.text} }).then(function(response) {
var data = response.data;
var query = new Query();
query = (e.text !== '') ? query.where('ContactName', 'startswith', e.text, true) : query;
e.updateData(data.value, query);
},function(response) {
console.log(response.data)
});
}
} |