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

Handling Null values in the Pivotgrid

5 Answers 287 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Julio
Top achievements
Rank 1
Julio asked on 09 Jul 2013, 04:10 PM
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!  

5 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 12 Jul 2013, 09:43 AM
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.
0
Julio
Top achievements
Rank 1
answered on 21 Aug 2013, 05:27 PM
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!
0
Tsvetoslav
Telerik team
answered on 22 Aug 2013, 10:45 AM
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.
0
Michael Shaich
Top achievements
Rank 1
answered on 27 Jun 2014, 11:55 PM
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.
0
Julio
Top achievements
Rank 1
answered on 28 Jun 2014, 12:01 AM
Nope, I just use isnull(column1,'') as column1  in SQL in this solves my issue!
Tags
PivotGrid
Asked by
Julio
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Julio
Top achievements
Rank 1
Michael Shaich
Top achievements
Rank 1
Share this question
or