Pivot Grid Dynamic Query

Hi

I want to know that how can I use pivot grid with dynamic sql query?


Thanks.




1 Reply

MM Manikandan Murugesan Syncfusion Team December 14, 2017 05:24 PM UTC

Hi Olman, 
 
We were unable to understand the exact requirement from your query. Meanwhile, we have prepared prototype sample for refresh the PivotGrid dynamically. Please find the sample in below link. 
In the sample, we have dynamically change the datasource using button click event. Here, you can call AJAX method and get data from database and set it to the PivotGrid. Please refer below code snippet. 
Code Snippet: [javascript] 
function btnClick(args) { 
            var pivotGridObj = $('#PivotGrid1').data("ejPivotGrid"); 
            pivotGridObj.model.dataSource.data = data; 
//Here, you can call AJAX method and get data from database and set it to the PivotGrid. 
            pivotGridObj.refreshControl(); 
} 
 
If this doesn’t match your requirement, kindly provide more details about your requirement with screenshots/video (if possible) which would be helpful for us to proceed further. 
 
Thanks, 
Manikandan.

Loader.
Up arrow icon