Summary Column with Minimum / Maximum DateTime

How do I add a summary row that shows the Minimum or Maximum DateTime for a given column? I''ve tried: GridSummaryColumnDescriptor summaryColumn1 = new GridSummaryColumnDescriptor("GallonsTotal", SummaryType.DoubleAggregate, "gallons", "{Sum:####.00}"); GridSummaryRowDescriptor summaryRow1 = new GridSummaryRowDescriptor(); summaryRow1.Name = "Caption"; summaryRow1.Visible = false; GridSummaryColumnDescriptor startColumn = new GridSummaryColumnDescriptor("startOf", SummaryType.Int32Aggregate, "dtreadingstart", "{Minimum:MM/dd/yy hh:mm tt}"); GridSummaryColumnDescriptor endColumn = new GridSummaryColumnDescriptor("endof", SummaryType.Int32Aggregate, "dtsampleendtime", "{Maximum:MM/dd/yy hh:mm tt}"); summaryRow1.SummaryColumns.Add(summaryColumn1); summaryRow1.SummaryColumns.Add(startColumn); summaryRow1.SummaryColumns.Add(endColumn); tableDescriptor.SummaryRows.Add(summaryRow1); if I only have the "gallons" column, above, it works as prescribed. However, with the Min and Max DateTime columns, it appears to lock up the grid. Do I need to use SummaryType.Custom? And if so, where do I find an example of its use?

1 Reply

AD Administrator Syncfusion Team April 17, 2006 09:33 AM UTC

Hi ERobishaw, This can be achieved by using the custom summary field. Here is the sample which, shows a method of having Max and Min Date summary fields in the GridGroupingControl. Sample : Max_Min_Date_SummaryField KB article : CustomSummary [ \\windows\Grid.Grouping.Windows\Samples\CustomSummary ] Thanks for being patient. Best regards, Madhan

Loader.
Up arrow icon