Version

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.

Summaries

In some cases, your end users may be overwhelmed by the amount of data displayed in the xamGrid control, and often they may be just looking for a summary of the data. Your end users may also want to derive additional information from the data of a specific column. Row summaries help your end users achieve this.

You can enable row summaries for a column in xamGrid by setting the SummaryRowSettings object’s AllowSummaryRow to one of the following values of the RowSummaryLocation, which will determine where the summaries will be displayed, enumeration:

  • None – The summary row will not be displayed.

  • Top – The summary row will be displayed at the top of the row island.

  • Bottom – The summary row will be displayed at the bottom of the row island.

  • Both – The summary row will be displayed at the top and the bottom of the row island.

When you set the AllowSummaryRow property, xamGrid will display a summary button in the column header. Your end users can click/tap the summary button to display a summary selection dialog box. In the summary selection dialog box, they can select the row summaries they want to see.

When you are enabling summaries, there are different SummaryDefinitionCollection 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. You can set this property to one of the following SummaryScope enumeration:

  • ChildBand – Each child band of data will be summed independently.

  • ColumnLayout – All rows that share a ColumnLayout will be summed together.

For more information on column layouts, see the Define Column Layout topic.

You can also manually add summaries for a row using XAML or procedural code, for more information see Programmatically Add Summaries.

The following code demonstrates how to enable row summaries.

In XAML:

<ig:XamGrid x:Name="MyGrid" AutoGenerateColumns="False">
    <ig:XamGrid.SummaryRowSettings>
        <ig:SummaryRowSettings AllowSummaryRow="Top" SummaryScope="ColumnLayout"/>
    </ig:XamGrid.SummaryRowSettings>
</ig:XamGrid>

In Visual Basic:

Imports Infragistics.Controls.Grids
..
Me.MyGrid.SummaryRowSettings.AllowSummaryRow = SummaryRowLocation.Top
Me.MyGrid.SummaryRowSettings.SummaryScope = SummaryScope.ColumnLayout

In C#:

using Infragistics.Controls.Grids;
…
this.MyGrid.SummaryRowSettings.AllowSummaryRow = SummaryRowLocation.Top;
this.MyGrid.SummaryRowSettings.SummaryScope = SummaryScope.ColumnLayout;
xamGrid Whats New Summaries 01.png