We recommend that you use the xamDataGrid control instead of the xamGrid control. The xamGrid is being planned for retirement over the next few years and will not receive any new features. We will continue to provide support and critical bug fixes for the xamGrid during this time. 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;