ASPxSummaryItem.ShowInGroupFooterColumn Property
Specifies a column to display group summaries in its group footer cells.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v21.2.dll
NuGet Package: DevExpress.Web
Declaration
Property Value
Type | Default | Description |
---|---|---|
String | String.Empty | A column’s name, field name, or caption. |
Remarks
This property is in effect for group summaries.
The grid implements the following properties that allow you to specify where to display a group summary:
- ShowInColumn
- The grid displays group summaries in group rows only when a user groups grid data by the column specified in this property.
ShowInGroupFooterColumn
- The grid displays group summaries in the specified column’s group footer cells instead of group rows.
Example
The example below assigns the “Total” column’s caption (“Total Cost”) to the ShowInGroupFooterColumn
property to display group summaries in this column’s group footer cells.
Web Forms
<dx:ASPxGridView ID="ASPxGridView1" runat="server" ...>
<Settings ShowGroupFooter="VisibleAlways" />
<Columns>
<!--...-->
<dx:GridViewDataTextColumn FieldName="Total" UnboundType="Decimal" Caption="Total Cost" />
</Columns>
<GroupSummary>
<dx:ASPxSummaryItem FieldName="Total" ShowInGroupFooterColumn="Total Cost" SummaryType="Sum" />
</GroupSummary>
</dx:ASPxGridView>
MVC
var grid = Html.DevExpress().GridView(settings =>
{
settings.Name = "ASPxGridView1";
//...
settings.Columns.Add(c =>
{
c.FieldName = "Total";
c.UnboundType = DevExpress.Data.UnboundColumnType.Decimal;
c.Caption = "Total Cost";
});
settings.Settings.ShowGroupFooter = GridViewGroupFooterMode.VisibleAlways;
settings.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "Total").ShowInGroupFooterColumn = "Total Cost";
});
See Also