Hi,
I have a table in the database which needs to be displayed on the grid. If I need a group by and a summary row feature together on the data, its possible with XamGrid. However when a column is grouped by, it appears as a single row and user would have to expand to view the child rows.
I was wondering if I can have them view in hierarchical instead. For ex> A Sum(B) Sum(C) A B1 C1 A B2 C2> A Sum(B) Sum(C) A B1 C1 A B2 C2
Is this possible??
Yes, its possible, however we don't currently offer as an inbox feature the ability to show summaries, although it is something we are looking into.
For now though, you can actually achieve this yourself, by using the Column's GroupByItemTemplate property. The DataContext for the Template, provides you with all the information you'll need to calculate the sums for each GroupByRow.
We actually have a very good article that shows something similar:
http://help.infragistics.com/NetAdvantage/Silverlight/2010.3/CLR4.0/?page=SL_xamGrid_Custom_GroupBy_Row_Display.html
Hope this helps,
-SteveZ
Hi Steve,
GroupByItemTemplate might not be the best solution for me as I need aggregated sum for each column to be displayed at parent level and have child rows displayed below that.
I came across this link which talks about TemplateColumnLayout. This potentially can be the solution. I am planning to display the aggregated sum values as data on the grid (with select sum(a), sum (b)... ) and when clicked on the arrow, I plan to make a async call and display the child rows(please suggest if there is a better solution). Although I am not sure which event gets triggers on clicking the arrow. Can you please help me with it?