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

Pivot Grid Null Value

Hi Team,

I am trying to change null value or no value to 0 or specific value in pivot grid but I couldnt find how to do.

Thanks in advance.

2 Replies

SU Suriya Syncfusion Team December 14, 2018 07:29 AM UTC

Hi Serdar, 
Currently, we don’t have direct API to show the null or no value as zero or custom value. But, You can change null value (or) no value to 0 by using queryCellInfo event. Please refer the below code snippet to show the cell text as zero. 
Code Snippet [Typescript]: 
queryCell(args: any): void { 
    (this.pivotGridObj.renderModule as any).rowCellBoundEvent(args); 
    if (args.cell.innerText == '') { 
        args.cell.innerText = 0; 
  enginePopulated(args: any): void { 
    this.pivotGridObj.grid.queryCellInfo = this.queryCell.bind(this); 
Code Snippet: [HTML] 
<ejs-pivotview #pivotview id='PivotView' [dataSource]=dataSource width='100%' height='300' (enginePopulated)='enginePopulated($event)'> 
Meanwhile, we have prepared sample for your reference. Please find the sample in below link. 
We will be provided direct API for this feature in any of our upcoming releases. 

serdar çelebi December 14, 2018 08:42 AM UTC

Thanks for the solution, it works well ;)

Live Chat Icon For mobile
Up arrow icon