PivotGrid with Null Values

7 posts, 0 answers
  1. Feyzi
    Feyzi avatar
    7 posts
    Member since:
    Sep 2013

    Posted 25 Mar 2015 Link to this post

    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

  2. CS
    CS avatar
    87 posts
    Member since:
    Apr 2014

    Posted 25 Mar 2015 in reply to Feyzi Link to this post

    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.
  3. Feyzi
    Feyzi avatar
    7 posts
    Member since:
    Sep 2013

    Posted 25 Mar 2015 in reply to CS Link to this post

    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.
  4. CS
    CS avatar
    87 posts
    Member since:
    Apr 2014

    Posted 26 Mar 2015 Link to this post

    Yes that seems to be a weakness in PivotGrid DataSource maybe. I circumvented that problem always by filling up empty or missing values already while reading the data.
  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3725 posts

    Posted 27 Mar 2015 Link to this post

    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!
     
  6. Stavros Menegos
    Stavros Menegos avatar
    8 posts
    Member since:
    Jul 2006

    Posted 25 Sep in reply to Georgi Krustev Link to this post

    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

  7. Stefan
    Admin
    Stefan avatar
    1257 posts

    Posted 27 Sep Link to this post

    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.
Back to Top