Hi to all!
Can someone help me out on this issue, that i have been searching and searching and nothing.I need to have somes rows like a sub-total of that group of rows.Like this:
| Col1 | Col2| Col3 | Qtd. | Money| A | X | X | 2 | 3€ | A | X | X | 3 | 7.10€| Sub-total | 5 | 10.10€ ( <- How to create this sub-total for lines A?) | B | X | X | 1 | 5€| B | X | X | 1 | 1€| Sub-total | 2 | 6€ ( <-How to create this sub-total for lines B?) | Total | 7 | 16.10€
I need all rows visible, sub-totals and grand-total.
Sample would be great...
MANY THANKS!!
Oops, actually it's not FixedOnTop/Bottom you need, it's GroupByRowsFooter.
Here's some sample code using the column names you show here.
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { UltraGridLayout layout = e.Layout; UltraGridBand band = layout.Bands[0]; // Add a Summary to the Qtd column UltraGridColumn qtdColumn = band.Columns["Qtd"]; band.Summaries.Add(SummaryType.Sum, qtdColumn); // Add a Summary to the Money column UltraGridColumn moneyColumn = band.Columns["Money"]; band.Summaries.Add(SummaryType.Sum, moneyColumn); // Set SummaryDisplayArea to show summaries at the bottom of each group and also // a grand total. band.Override.SummaryDisplayArea = SummaryDisplayAreas.GroupByRowsFooter | SummaryDisplayAreas.Bottom; // Allow OutlookGroupBy functionality. layout.ViewStyleBand = ViewStyleBand.OutlookGroupBy; //layout.GroupByBox.Hidden = true; // Group by the "Col1" column. band.SortedColumns.Add("Col1", false, true); }
Hi Mike,
Is there a way to use Outlook GroupBy to get the group summaries and then display the grid w/o grouping. I know it sounds odd, but the requirement is not to explicitly show the groups but just show sum in the footer for each group and then a grand total in the last row. While i'm able to get the stuff using outlook groupby feature, just wondering whether there is a way to use it to get the sum and then show all rows w/o grouping.
Thanks !