ASPxCardViewSummaryDisplayTextEventArgs.Item Property
Gets a summary item whose value is being processed.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v18.2.dll
Declaration
Property Value
Type | Description |
---|---|
ASPxCardViewSummaryItem | An ASPxCardViewSummaryItem object that represents the summary item whose value is being processed. |
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) Handle the SummaryDisplayText event to calculate the required summary value and set the e.Text parameter.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/aspxcardview-how-to-implement-a-summary-whose-value-depends-upon-an-external-editor-value-t333558
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void ASPxCardView1_SummaryDisplayText(object sender, DevExpress.Web.ASPxCardViewSummaryDisplayTextEventArgs e)
{
if (e.Item.FieldName == "CategoryID")
e.Text = string.Format("Sum = {0}", Convert.ToDouble(e.Value) * Convert.ToDouble(ASPxSpinEdit1.Value));
}
}