We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Filter dialog not showing data using remote data


I am using grid with Excel type filter. When the first time I expand Excel filter in column - I can see all my data. But when I am trying to filter data in this dialog - I am always getting - No Matches Found - although I see that I get no errors and get correct data from WebAPI.

I can represent this issue in this example: https://stackblitz.com/edit/angular-yflj6f?file=app.component.ts

At first I see everything:

After adding some text I can not see records:

11 Replies

TS Thavasianand Sankaranarayanan Syncfusion Team September 4, 2019 06:52 AM

Hi AC, 
Thanks for contacting Syncfusion support. 
We have validated the provided example,  If you have using WebAPIAdaptor for Grid data binding , we need to handle the Grid actions(like paging , filtering, sorting) in server side (web service).  In the given demo service we didn’t handle the filtering action. So as per your requirement we have created a sample with WebAPiAdaptor and perform Grid actions in server side. Kindly refer to the below code example and sample for more information.  
<ejs-grid #grid [dataSource]='data' allowFiltering="true" allowPaging="true" allowSorting="true" height="320">  
        <e-column field='OrderID' headerText='Order ID' isPrimaryKey=true width='150'></e-column>  
        <e-column field='CustomerID' headerText='Customer Name' width='150'></e-column>  
        <e-column field='ShipCity' headerText='ShipCity' width='150' textAlign='Right'></e-column>        
export class FetchDataComponent {  
    public data: any;  
  public grid: GridComponent;  
  ngOnInit(): void {  
    this.data = new DataManager({  
      url: 'api/Orders',  
      adaptor: new WebApiAdaptor  
public object Get()  
            var queryString = Request.Query;  
            var data = OrdersDetails.GetAllRecords().ToList();  
            string sort = queryString["$orderby"];   //sorting       
            string filter = queryString["$filter"];  //filtering  
            if (filter != null)  
                var newfiltersplits = filter;  
                var filtersplits = newfiltersplits.Split('('')'' ');  
                var filterfield = filtersplits[1];  
                var filtervalue = filtersplits[3];  
                if (filtersplits.Length != 5)  
                    filterfield = filter.Split('('')''\'')[3]; //get field from query  
                    filtervalue = filter.Split('('')''\'')[5]; // get value from query  
                switch (filterfield)  
                    case "OrderID":  
                        data = (from cust in data  
                                where cust.OrderID.ToString() == filtervalue.ToString()  
                                select cust).ToList();  
                    case "CustomerID":  
                        data = (from cust in data  
                                select cust).ToList();  
            int skip = Convert.ToInt32(queryString["$skip"]);  // paging 
            int take = Convert.ToInt32(queryString["$top"]);  
            return take != 0 ? new { Items = data.Skip(skip).Take(take).ToList(), Count = data.Count() } : new { Items = data, Count = data.Count() };  

Thavasianand S. 

UN Unknown Syncfusion Team September 5, 2019 01:35 AM


I was asking not about WebAPI to get correct data but about FrontEnd what to do to see data in Filter dialog despite of what data I am getting from WebAPI because now when I add some text in Search box of Filter dialog - I get data from WebAPI but I see No Matches Found. Also after that when I click X (clear button) in search box - I still see No Matches Found.

Also when I am using Custom filter and trying to search value, I can see The Request Failed message.

By the way, I am using Syncfusion grids version 17.1.48 and my own WebAPI but still facing the same problem.

SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team September 9, 2019 08:53 AM

Hi Customer,  

Please share the following details to analyze the problem at our end.  

  1. Complete code of the Grid Component
  2. dataSource binding
  3. server-end code

Seeni Sakthi Kumar S. 

UN Unknown Syncfusion Team September 9, 2019 09:09 AM


As I mentioned before you can represent this issue in StackBlitz example: https://stackblitz.com/edit/angular-yflj6f?file=app.component.ts

It is modified sample from examples having my mentioned problems. The problem are that we get data from WebAPI but this data is not displayed in Excel filter popup. For now I do not need correct data, I need the data to be displayed where it should be displayed. 

BS Balaji Sekar Syncfusion Team September 10, 2019 11:05 PM

Hi Customer, 

We have validated your query with provided the information and we found that webservices is not filtering operation handling on server-side. It is cause of the problem. We have created a sample with Excel Filtering binding in WebApi adaptor in Angular platform. Please refer the below code example and sample for more information. 
<ejs-grid #grid [dataSource]='data' allowFiltering="true" allowPaging="true" allowSorting="true" height="320" [filterSettings]="filterSettings" (actionComplete)="onActionComplete($event)" > 
        <e-column field='OrderID' headerText='Order ID' isPrimaryKey=true width='150'></e-column> 
        <e-column field='CustomerID' headerText='Customer Name' width='150'></e-column> 
        <e-column field='ShipCity' headerText='ShipCity' width='150' textAlign='Right'></e-column>       
public onActionComplete(args:any){     
    if (args.requestType == 'filterafteropen') { 
        args.filterModel.sInput.onkeyup = this.addfilterParams.bind(this); 
    public addfilterParams(args: any) {         
        if (this.grid.query.params.length > 0) { 
            this.grid.query.params = []; 
        this.grid.query.addParams("where", args.currentTarget.value);  // when put input value of excel filter search box to trigger and pass argument to server(its make search action  in excel filtering) 
public object Get() 
            var queryString = Request.Query; 
            var data = OrdersDetails.GetAllRecords().ToList();     
            string filter = queryString["$filter"]; 
            string where = queryString["where"]; //Get the addParam value from client 
            if (where != null && filter !=null) 
                var newfiltersplits = filter; 
                var filtersplits = newfiltersplits.Split('(', ')', ' '); 
                var filterfield = filtersplits[1] == "tolower" ? filtersplits[2] : filtersplits[1]; 
                var filtervalue = where; 
                if (data.Count == 0) { 
                    data = OrdersDetails.GetAllRecords().ToList(); 
                switch (filterfield) 
                    case "OrderID": 
                        data = (from cust in data 
                                where cust.OrderID.ToString() == filtervalue.ToString() 
                                select cust).ToList(); 
                    case "CustomerID": 
                        data = (from cust in data 
                                where cust.CustomerID.StartsWith(filtervalue.ToString()) 
                                select cust).ToList(); 
                    case "ShipCity": 
                        data = (from cust in data 
                                where cust.ShipCity.StartsWith(filtervalue.ToString()) 
                                select cust).ToList(); 
            int skip = Convert.ToInt32(queryString["$skip"]); 
            int take = Convert.ToInt32(queryString["$top"]); 
            return take != 0 ? new { Items = data.Skip(skip).Take(take).ToList(), Count = data.Count() } : new { Items = data, Count = data.Count() }; 

Please get back to us, if you need further assistance: 

Balaji Sekar. 

HA Hao November 18, 2020 12:16 PM


I got exactly the same issue. I always get the message "No Matches Found" when search for a result in header filter.
The data return from server correctly but the filter is wrong.
After debugging the code, I add this line query.isCountRequired = true; to my processQuery(), then it works fine

I used ej2-grids@18.3.50

Is it a bug in data grid?

SK Sujith Kumar Rajkumar Syncfusion Team November 19, 2020 04:04 AM

Hi Hao, 

We checked your reported problem and would like to let you know that while typing in the filter search bar, the count required parameter will not be sent as it is not required for this case. This is its default behavior as only the result items need to be returned here as shown in the below image, 


So if the requires count parameter in the received request is not true, then please return the result alone back to the Grid from the server. 

We have prepared a sample based on this for your reference to check the request/response flow. You can find it below, 

Let us know if you have any concerns. 

Sujith R 

HA Hao November 19, 2020 10:54 AM

Hi Sujith,

Sorry, I'm not clear your answer
I'm using pure javascript (typescript), not Angular
I have a project list retrieved from a server like this. When I click on the header triangle the checkboxes display correctly.

But when I type "PR" in the search, I got the message "No match found"
The server result a lot of records