I have a grid based on a pivot table returned from SQL server, using the tsql pivot function. The pivot returns null values in some cases. Ideally, I would address null values in the pivot function, but have not figured that out yet.
This caused two issues in the grid.
1) Calculated column for totals on the right of the grid. Since Null + Anything = Null, any null value produces. I found that using IsNull in the expression for the calculation works, so I am ok on that one.
2) Footer agregates - same issue, but I cannot use IsNull in the dataformatstring. So Agregate sums for footers are not working properly.
Also, the zero's just look better, as opposed to an empty cell.
So the question is, what is the best/easiest approach for converting null values in grid items to zeros? Can it be done declaritively, or must it be done in code behind, i.e., in the ItemCreated event?
Thanks,
Paul
This caused two issues in the grid.
1) Calculated column for totals on the right of the grid. Since Null + Anything = Null, any null value produces. I found that using IsNull in the expression for the calculation works, so I am ok on that one.
2) Footer agregates - same issue, but I cannot use IsNull in the dataformatstring. So Agregate sums for footers are not working properly.
Also, the zero's just look better, as opposed to an empty cell.
So the question is, what is the best/easiest approach for converting null values in grid items to zeros? Can it be done declaritively, or must it be done in code behind, i.e., in the ItemCreated event?
Thanks,
Paul