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.
Unfortunately, activation email could not send to your email. Please try again.

ejDataManager ejQuery

Thread ID:

Created:

Updated:

Platform:

Replies:

124450 Jun 10,2016 05:35 AM Jun 13,2016 11:54 PM JavaScript 3
loading
Tags: ejDataManager
Morgan
Asked On June 10, 2016 05:35 AM


What are or where can I find a list of "conditional Operators" for ej.Query().where("fieldName","operator","value")

e.g. dm = ej.DataManager(window.gridData).executeLocal(ej.Query().where("OrderID","lessthan","10253"));

Is it possible to have an AND condition in the where such as
OrderID > 10253 AND OrderID < 12000

How would I get the result of OrderID in (10253, 10254, 10258, 10260, 10264)

Thanks

Morgan



Ragavee U S [Syncfusion]
Replied On June 13, 2016 12:44 AM

Hi Morgan, 

Thanks for contacting Syncfusion support. 

Query #1: What are or where can I find a list of "conditional Operators" for ej.Query().where 

Please refer to the below online documentation where we have listed out and explained about the various operators supported by the filter query. 


Query #2: Is it possible to have an AND condition in the where 

Yes. We can achieve your requirement to perform AND/OR operation on two filter queries using the ej.Predicate helper function. Please refer to the below online documentation for more information. 


Query #3: How would I get the result of OrderID in (10253, 10254, 10258, 10260, 10264) 

We can achieve the above requirement using the below complex query generated using the or predicate. 

ej.Query().where( 
        ej.Predicate("OrderID", ej.FilterOperators.equal, 10253, true) 
        .or("OrderID", ej.FilterOperators.equal, 10254, true) 
        .or("OrderID", ej.FilterOperators.equal, 10258, true) 
        .or("OrderID", ej.FilterOperators.equal, 10260, true) 
        .or("OrderID", ej.FilterOperators.equal, 10264, true)); 



Regards, 
Ragavee U S. 


Morgan
Replied On June 13, 2016 03:44 AM

Thanks very much for your reply.

It answers all my queries.

I had been searching the API Reference section of the Documentation. 
I did not realized that the answers were in the DataManager section.

Thanks again

Morgan

Ragavee U S [Syncfusion]
Replied On June 13, 2016 11:54 PM

Hi Morgan, 
  
Thanks for your update. 
  
We are happy that your requirement is achieved. 
  
Regards, 
Ragavee U S. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;