Hi,
I have a custom view which calculates this way:
select ID, Name, Stock, (CASE WHEN Formato.Nombre = '25 gramos' THEN Cantidad END) AS [25 Gramos],
(CASE WHEN Formato.Nombre = '50 gramos' THEN Cantidad END) AS [50 Gramos]
From products
That I populate into a GridView, no issues. Now.. when I try to add a GridViewSummaryRowItem to the rows [25 Gramos] and [50 Gramos] then it doesn't show up.
GridViewSummaryItem summaryItem50 = new GridViewSummaryItem("50 Gramos", "Total 50 Gramos: {0}", GridAggregateFunction.Sum);
GridViewSummaryItem summaryItem25 = new GridViewSummaryItem("25 Gramos", "Total 25 Gramos: {0}", GridAggregateFunction.Sum);
GridViewSummaryRowItem summaryRowItem = new GridViewSummaryRowItem();
summaryRowItem.Add(summaryItem50);
summaryRowItem.Add(summaryItem25);
The code works because if I replace any of the 2 by Stock it shows up.
Is it because the View is constructed this way using CASE that the grid doesn't show the summary items?
Thanks!