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

How to connect to SQL Server with EJ2 PivotGrid

Platform: JavaScript - EJ 2 |
Control: Pivot Table

The following steps explain how to connect and retrieve the data from SQL Database and then bind the data with pivot grid.

Step 1:

The following code snippet illustrates retrieving the data from SQL database.

C#

 

Step 2:

After retrieving the data from database, bind it to the pivot grid using the <e-dataSource data> property.

CSHTML

 

 

The following screenshot displays a simple pivot grid bounded to data from SQL Database. Here, ‘Country’ field in row, ‘Product’ field in column, and ‘Amount’ field in value are bounded. Check complete code from the sample, which is attached in the following link.

 

 

Sample link: SQL data binding

 

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon 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.Close Icon

Live Chat Icon For mobile