Handling Null values in the Pivotgrid

6 posts, 0 answers
  1. Julio
    Julio avatar
    6 posts
    Member since:
    Feb 2013

    Posted 09 Jul 2013 Link to this post

    My issue is, when binding null data from a data set to the Pivot grid.  When any of my data has a null value, my pivot grid does not display any data at all with no error.  Yet, the data set has all other not null data before binding to the grid.   Is there a way to handle nulls through any of the pivot grid's properties instead of me placing an isnull() function for all columns in SQL.  Thank you!  
  2. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 12 Jul 2013 Link to this post

    Hello Julio,

    RadPivotGrid has an EmptyValue property, whatever is set to that will appearh in the null values cells.
     
    Regards,
    Tsvetoslav
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Julio
    Julio avatar
    6 posts
    Member since:
    Feb 2013

    Posted 21 Aug 2013 Link to this post

    Hi Tsvetoslav,

    The issue I am having is the pivot grid is not displaying any data at all when there is a null value present anywhere in my dataset.  I should still see the other data that is not null, but the pivot is completely blank.  If you run the same stored procedure I am using to populate the dataset in SQL management studio there are other rows returned without null values; my dataset is not empty.  It seems that when there is a null value in any cell it blows the whole pivot grid without any error.  The only way I found to get around this issue is to add an isnull() function and change the null value as a blank string. 

    For example: isnull(column1,'') as column1 in my stored procedure to any fields where I might expect a null.

    Once the isnull() function is added in SQL the pivot grid is no longer blank and it will displays all the other non null data.  We will be using the pivot control in many reports and would like to try to avoid adding isnull() to all our stored procedures. Is there a way to allow nulls in the pivot grid? I tried to use the empty value property but it didn't work for me. Thank you for all your help!
  5. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 22 Aug 2013 Link to this post

    Hello Julio,

    Null value don't prevent RadPivotGrid from creating its reports properly - there is something on your end that provokes the behaviour you have observed but without a working project it is difficult to tell exactly what. Therefore, I'd advise you to open up a formal support ticket and send your implementation ( a working copy of it) so that we can debug it and get more insight.
     
    Regards,
    Tsvetoslav
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  6. Michael Shaich
    Michael Shaich avatar
    4 posts
    Member since:
    Sep 2009

    Posted 27 Jun 2014 Link to this post

    Was there ever a resolution to this issue? I am encountering the same scenario - a NULL in any column in the dataset destroys the RadPivotGrid. Please advise.
  7. Julio
    Julio avatar
    6 posts
    Member since:
    Feb 2013

    Posted 27 Jun 2014 in reply to Michael Shaich Link to this post

    Nope, I just use isnull(column1,'') as column1  in SQL in this solves my issue!
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017