Please note that this control has been retired and is now obsolete to the XamDataGrid control, and as such, we recommend migrating to that control. It will not be receiving any new features, bug fixes, or support going forward. For help or questions on migrating your codebase to the XamDataGrid, please contact support.
Retrieve the Result of a Summary
There are different SummaryResultCollection collections available, for example the column layout or the child band collections. The one that is used depends on the value of the SummaryRowSettings/SummaryRowSettingsOverride object’s SummaryScope property.
The Value property of the SummaryResult object returns the result of the summary. You may need to cast the Value property to the correct data type before using it in your application logic.
The built-in summary calculators will return the following data types:
Summary Calculator |
* Data Type* |
|
|
|
|
|
|
|
|
|
|
The SummaryDefinition of the SummaryResult object returns the Column which the summary is executed on, and the SummaryOperand of the summary.
The following example code demonstrates how to retrieve values from the SummaryResult object.
Dim SumResult As Object = Me.MyDataGrid.SummaryRowSettings.SummaryResultCollection(0).Value
Dim SumDefinition As SummaryDefinition = Me.MyDataGrid.SummaryRowSettings.SummaryResultCollection(0).SummaryDefinition
Dim MySummary As SummaryOperandBase = SumDefinition.SummaryOperand
Dim MyColumn As String = SumDefinition.ColumnKey
object SumResult = this.MyDataGrid.SummaryRowSettings.SummaryResultCollection[0].Value;
SummaryDefinition SumDefinition = this.MyDataGrid.SummaryRowSettings.SummaryResultCollection[0].SummaryDefinition;
SummaryOperandBase MySummary = SumDefinition.SummaryOperand;
String MyColumn = SumDefinition.ColumnKey;