I am trying to set up a GroupFooterTemplate and to calculate a value to put in the footer I need to know the value of the grouped attribute. In this case I am grouping on a column named "Category" and I call a function that needs to know the value of the category column in the group above the footer. If that's not clear here is a screenshot to help illustrate the value I'm trying to find when generating the group footer.
So I'm hoping to be able to pull that category value, "Biological" or "Kiln", when generating the group footer which I do by using the code here.
Currently it is just hard coded to use Biological but I would like it to be able to use the category column value for each group to generate the correct value in each footer under each group. So ideally there is something I can access from the grid that will correspond to the value of the grouped column at each point where the footer is generated (so some variable that would change between biological, kilns, etc as the grid is created).
<GridColumn Field="@lengthColumnName" FieldType="@typeof(decimal)" Title="@myName" Width="180px"> <GroupFooterTemplate Context="unitFooterContext"> Total: %@calculateSubtotal(lengthColumnName, "Biological").ToString() </GroupFooterTemplate> </GridColumn>