EJ2 PivotGrid: How do you execute a query on the grid?

Hello and this is probably a basic question, with the regular grid component, I can do query: new ej.data.Query().where(....) but I do not see that with the PivotGrid.  How do you go about doing dynamic queries for remote datasources with this component?

Thank you all!

3 Replies 1 reply marked as answer

MM Manikandan Murugesan Syncfusion Team May 21, 2021 03:22 PM UTC

Hi Mark, 

Kindly refer the following code example to use your own query to fetch data in DataManager used in the pivot table. 
Code Example: 
var remoteData = new ej.data.DataManager({ 
    url: 'https://js.syncfusion.com/demos/ejServices/Wcf/Northwind.svc/Orders', 
    adaptor: new ej.data.ODataAdaptor(), 
    crossDomain: true 
  }); 
  remoteData.defaultQuery = new ej.data.Query().take(10); 
 
 

Meanwhile, we have prepared sample for your reference. 

Please let us know if you have any concerns. 

Regards, 
Manikandan 


Marked as answer

MA Mark May 23, 2021 02:15 PM UTC

Thank you!  Worked like a champ!


MM Manikandan Murugesan Syncfusion Team May 24, 2021 06:03 AM UTC

Hi Mark, 

Please let us know if you have any other queries. We are always happy to assist you. 
 
Thanks, 
Manikandan. 


Loader.
Up arrow icon