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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to add empty values for fields in data source in PivotGrid (client-side)?

Platform: JavaScript |
Control: ejPivotGrid |
Published Date: March 7, 2016 |
Last Revised Date: June 17, 2019

This KB illustrates that to add empty values for fields in data source in PivotGrid (client-side).

Solution:

You can add empty values for fields in datasource by using the blank spaces (" ") for the empty values.

The below example illustrates the same for empty values in data source.

JavaScript:

 
var pivot_dataset = [
    { Date: "FY 2005", Product: "Bike", Quantity: 2, State: " " },
    { Date: "FY 2005", Product: "Van", Quantity: 3, State: "British Columbia" },
    { Date: "FY 2005", Product: "Car", Quantity: 4, State: "Brunswick" },
    { Date: "FY 2005", Product: "Bike", Quantity: 3, State: " " },
]
 
 
$("#PivotGrid").ejPivotGrid({
     dataSource: {
         data: pivot_dataset,
                        
           ////
 
      }
 });
 

 

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