This is a migrated thread and some comments may be shown as answers.

PivotGrid with Null Values

5 Answers 260 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Feyzi
Top achievements
Rank 1
Feyzi asked on 25 Mar 2015, 12:47 PM
When using a Plain JavaScript object containing Null Values, there are exceptions caused
by the PivotGrid. This is caused by line 620 in kendo.pivotgrid.js (Version 2015.1). On this line there is a check for undefined which can be extended to
check for null as well:

value = value !== undefined && value !== null ? value.toString() : value;

I was able to reproduce the error with the sample http://demos.telerik.com/kendo-ui/pivotgrid/local-flat-data-binding
when setting some Fields to null.

It is this behavior intended? For me, it seems like a bug that should be fixed

5 Answers, 1 is accepted

Sort by
0
CS
Top achievements
Rank 2
answered on 25 Mar 2015, 01:17 PM
So how did you set values to null in that example? Do you have the example code? I'm not quite sure but maybe defaultValue: 0, nullable:false might help here.
0
Feyzi
Top achievements
Rank 1
answered on 25 Mar 2015, 02:41 PM
I send you a example. It based on the demo pivot grid. You should be able to reproduce the exception. defaultValue: 0, nullable:false wasn't a solution for this issue.
0
Georgi Krustev
Telerik team
answered on 27 Mar 2015, 09:45 AM
Hello Feyzi,

Indeed, the described behavior is not expected and should be fixed. I logged it and will address it for the upcoming service pack of Kendo UI due the end of April.

I updated your Telerik points because of the find.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Stavros Menegos
Top achievements
Rank 1
answered on 25 Sep 2017, 12:41 PM

Hi,

Any news on this? I am using the latest release version i.e. 2017.3.921 of kendo-pivot and it seems that when a column / row i.e. dimension is null or undefined the pivot displays either in the Row column or Column "column" "dimension name"&undefined

0
Stefan
Telerik team
answered on 27 Sep 2017, 10:24 AM
Hello, Stavros,

The mentioned issue was fixed as promised in the service pack back in 2015. It was connected to a JavaScript error that occurred.

The described behaviour is currently expected, as we show the data as it is. If we show empty string instead of null or undefined this may be not expected in some scenarios. As this can have multiple points of view, I can recommend submitting a feature request, on how this scenario has to be handled out of the box and based on the popularity we may implement it in a future release:

http://kendoui-feedback.telerik.com/forums/127393-kendo-ui-feedback/category/170004-pivot-grid

Also, the columnHeaderTemplate can be used to customize the column header values:

http://docs.telerik.com/kendo-ui/api/javascript/ui/pivotgrid#configuration-columnHeaderTemplate

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
PivotGrid
Asked by
Feyzi
Top achievements
Rank 1
Answers by
CS
Top achievements
Rank 2
Feyzi
Top achievements
Rank 1
Georgi Krustev
Telerik team
Stavros Menegos
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or