Skip to main content
A newer version of this page is available. .
Tab

ASPxGridView.SummaryDisplayText Event

Enables custom display text to be provided for any summary value.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

public event ASPxGridViewSummaryDisplayTextEventHandler SummaryDisplayText

Event Data

The SummaryDisplayText event's data class is ASPxGridViewSummaryDisplayTextEventArgs. The following properties provide information specific to this event:

Property Description
EncodeHtml Gets or sets a value that specifies whether the summary display text keeps any of its values that are HTML as HTML, or instead, strips out the HTML markers. Inherited from ASPxGridSummaryDisplayTextEventArgs.
IsGroupSummary Indicates whether a group summary value is processed.
IsTotalSummary Indicates whether a total summary value is being processed.
Item Gets the processed summary item.
Text Gets or sets the display text for the summary value currently being processed. Inherited from ASPxGridSummaryDisplayTextEventArgs.
Value Gets the processed summary value. Inherited from ASPxGridSummaryDisplayTextEventArgs.
VisibleIndex Gets a value that identifies the group row where the processed summary value is displayed.

Remarks

The SummaryDisplayText event is raised for both group and total summaries. Use the ASPxGridViewSummaryDisplayTextEventArgs.IsGroupSummary and ASPxGridViewSummaryDisplayTextEventArgs.IsTotalSummary properties to identify which summary value is being processed.

Initialy the event parameter’s ASPxGridSummaryDisplayTextEventArgs.Text property contains the text currently displayed in the group row or footer cell. To provide custom text, assign it to this property.

Example

The example below demonstrates how to calculate a summary in the CategoryID column based on the value in the ASPxSpinEdit residing below. Here is how the project works:1) A custom callback is sent to the server within the editor's client side NumberChanged event handler.

2) Use the SummaryDisplayText event to calculate the required summary value and set the e.Text parameter

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class MasterPage : System.Web.UI.MasterPage {
    protected void Page_Load(object sender, EventArgs e)  {
    }
}
See Also