ASPxGridViewSummaryDisplayTextEventArgs.IsGroupSummary Property
Indicates whether a group summary value is processed.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
Declaration
Property Value
Type | Description |
---|---|
Boolean |
|
Remarks
If the IsGroupSummary property returns true
, use the ASPxGridViewSummaryDisplayTextEventArgs.VisibleIndex property to identify the group row where the processed group summary value is displayed.
Example
The following example illustrates how to use the IsGroupSummary property.
Web Forms approach:
protected void ASPxGridView1_SummaryDisplayText(object sender, DevExpress.Web.ASPxGridViewSummaryDisplayTextEventArgs e) {
if (e.IsGroupSummary) {
if (e.Item.FieldName == "UnitsOnOrder") {
var val = TimeSpan.FromSeconds((int)e.Value);
e.Text = string.Format("{0:c}", val);
}
}
}
MVC approach:
var grid = Html.DevExpress().GridView(settings =>
{
settings.Name = "GridView";
settings.KeyFieldName = "ID";
...
settings.GroupSummary.Add(DevExpress.Data.SummaryItemType.Count, "TestField").ShowInGroupFooterColumn = "TestField";
settings.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "NumberField").ShowInGroupFooterColumn = "NumberField";
settings.SummaryDisplayText = (s, e) => {
if (e.IsGroupSummary)
if (e.Item.FieldName == "TestField")
e.Text = "TestText";
};
});
}
...
See Also