Filter data in Grid

Hello,

I am trying to use same filters in Essential JS version 2 like I used in Essential JS version 1. But there is a problem - in second version if I am using filter only on one column, I am getting different data from first version. It is always one more level in where clause. Even if I am using only one column filter with one value, I am getting parameter isComplex = true. Is there a possibility to avoid that and get same data like in first version?

In the left is data from second version, in the right - data from first version (it should be the same query because this is the same filter):


5 Replies

MF Mohammed Farook J Syncfusion Team May 11, 2018 01:31 PM UTC

Hi AC, 

Thanks for contacting Syncfusion Support. 

EJ2 Grid uses various filtering types and filtering multiple columns in such types, will generate much more complex predicates with nested conditions. While having such nested predicates will make the server side operation tedious, hence in order to ease the server side filtering, we have followed this structure in which one or more predicates are pushed under the predicates with isComplex set to true.  



At the server side, you can simply get and process the predicates as below pseudocode. 


  for (let w in where ) 
            { 
                if (w.isComplex === true): performFilter(w.predicates); 
 
            } 


please find the screenshot for more than column filtering query. 

 

Please let us know if you have any queries. 

Regards, 
J Mohammed Farook 



UN Unknown Syncfusion Team May 11, 2018 01:52 PM UTC

Hello,

If the filter is complex, then it is working perfectly, but when a filter is not complex, I am getting first parameter that it is complex. In my picture the filter is set only on one grid column, but first of all I am gertting isComplex = true. So how can I tell if the filter is really complex or not?




MF Mohammed Farook J Syncfusion Team May 14, 2018 11:37 AM UTC

Hi AC, 

Currently we have maintained same structure of filter model for both single and multiple columns. And we have consider “Change filter predicate structure for single and multiple column filter columns” as improvement and it will be included in any of our upcoming releases.  
 
Regards, 
J Mohammed Farook 



UN Unknown Syncfusion Team June 25, 2018 11:42 AM UTC

Hello,

when can I expect these changes?


MF Mohammed Farook J Syncfusion Team June 26, 2018 06:58 AM UTC

Hi AC,  
 
Currently we are working with your reported issue and it will be fixed in the upcoming patch release. 
 
Until then we appreciate your patience. 
 
Regards, 
J Mohammed Farook 


Loader.
Up arrow icon