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. Image for the cookie policy date

About Pivot Client data source

How can i change or bind pivot client data source from database? 
My example coding like that

aspx file code:
<ej:PivotClient ID="PivotClient1" runat="server" OnLoad="PivotClient1_Load" OnDataBinding="PivotClient1_DataBinding" ClientIDMode="Static" Title="Test1">
     <ToolbarIconSettings EnableChartTypes="true" />
     <DisplaySettings Mode="ChartAndGrid" EnableTogglePanel="true" DefaultView="Grid" />
     <DataSource EnableAdvancedFilter="true" IsFormattedValues="true"></DataSource>
</ej:PivotClient>

aspx.cs file code:
protected void PivotClient1_DataBinding(object sender, EventArgs e)
{
     try
     {
          PivotDataSource pds = new PivotDataSource();

          string a = JsonData(GetReportData("1").Tables["Rpt1"]);
          pds.Data = a;

          PivotClient1.Model.DataSource = pds;              
     }
     catch
     {

     }
}

4 Replies

MM Manikandan Murugesan Syncfusion Team March 27, 2017 01:01 PM UTC

Hi Jarobec, 

Thank you for using Syncfusion products. 

We have prepared simple PivotClient sample using local database for your reference. Please find the sample in the following link. 
  
Please let us know if you have any concerns. 

Regards, 
Manikandan M. 



SH SHIVANAND replied to Manikandan Murugesan February 6, 2021 08:22 PM UTC

Hi Jarobec, 

Thank you for using Syncfusion products. 

We have prepared simple PivotClient sample using local database for your reference. Please find the sample in the following link. 
  
Please let us know if you have any concerns. 

Regards, 
Manikandan M. 


Please provide sample code.
your attachment not downloading.



SH SHIVANAND February 6, 2021 09:49 PM UTC



SS Saranya Sivan Syncfusion Team February 8, 2021 05:27 PM UTC

Hi Shivanand, 
  
Kindly find the downloadable sample link below, 
  
  
  
Note: The Sample in the above link is of older version. So, it may do not run in latest version. Kindly let us know which version you are using so that we can share you the sample with compatible version. 
   
Please let us know if you have concern. 
  
Regards, 
Saranya Sivan. 
 


Loader.
Up arrow icon