Client-side filtering with EJ2 grid and ODataV4Adapter

Is there a way that I can force all filtering "where()" operations to be executed client-side when using the ODataV4Adapter? The backend server I am using has very limited support for the $filter OData feature and I'd like to have those filters be applied client-side after the full data set has been loaded from the backend server.

Thanks!

3 Replies

HJ Hariharan J V Syncfusion Team August 13, 2018 07:19 AM UTC

Hi Adam,  
  
Thanks for contacting Syncfusion support. 
 
We suggest you to enable `offline` property on the data manager which avoid post back on the server for all grid actions. Please refer the below code snippets. 
 
let dm: DataManager = new DataManager({ url: SERVICE_URI, adaptor: new ODataAdaptor, offline: true }); 
 
let grid: Grid = new Grid({ dataSource: dm }); 
 
   
Regards,  
Hariharan 



AD Adam August 13, 2018 02:19 PM UTC

Thanks!

When working in offline mode how does the creation of new rows or editing of rows work? Are those create and update methods still posted back to the server?



DR Dhivya Rajendran Syncfusion Team August 15, 2018 12:26 PM UTC

Hi Adam, 
Thanks for your update. 

Query : When working in offline mode how does the creation of new rows or editing of rows work? 

In Essential JavaScript 2 Grid component, If we set data manager offline property as true, then Grid will sent the server side request only once for loading the data at initialization. After that all grid actions such as paging filtering and CRUD(adding, editing, deleting) operation etc will be done based on the loaded data in the client side only.  

Note: When use offline mode, it does not send server side request while perform CRUD operation. 

Please get back to us if you need further assistance. 

Regards,
R.Dhivya  


Loader.
Up arrow icon