Handle datasource with different drill levels

Hi,

I need to fill the pivot table with a datasource that have rows with different number of sub levels.

For example:
1
  1.1
  1.2
2
  2.1
    2.1.1
    2.1.2
      2.1.2.1
  2.2

So in my example the max sublevel is 4 (2.1.2.1) and because of that it thinks that all rows has this amount of sublevels. Then it allows to dril for example 1.2 to the fourth sublevel but as it doesn't have data for it, it shows "undefined"

I'm attaching an image where you can see the output of a similar case.

There is a way to avoid those undefined and recognize when the row is a leaf correctly?

thanks

Attachment: Screenshot_from_20210331_172940_cbecfe40.zip

1 Reply

SS Saranya Sivan Syncfusion Team April 1, 2021 12:19 PM UTC

Hi Ezequiel, 
  
Thanks for contacting Syncfusion support. 
  
  
We would like to inform that the requirement can be achieved by using `showHeaderWhenEmpty` property. Please find the UG and sample below. 
  
Note: Hiding the undefined fields in pivot table is applicable only in row and column axis. You cannot hide the fields in the value axis. 
  
  
Sample:  
  
In the below screen-shot you can find that the rows Mountain Bikes and Mountain Cars is displayed only in the row header France. For Germany the row Mountain Bikes is hidden because it is undefined in the data source. 
  
Output:  
  
 
  
Please let us know if you have concerns. 
  
Regards, 
Saranya. 
 


Loader.
Up arrow icon