Back to Devexpress

ASPxSummaryItemBase.FieldName Property

aspnet-devexpress-dot-web-dot-aspxsummaryitembase-4dddad8a.md

latest5.0 KB
Original Source

ASPxSummaryItemBase.FieldName Property

Gets or sets the name of a data source field whose values are used for summary calculation.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue("")]
public virtual string FieldName { get; set; }
vb
<DefaultValue("")>
Public Overridable Property FieldName As String

Property Value

TypeDefaultDescription
StringString.Empty

A String value that specifies the name of the data source field.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the FieldName property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

asp-net-web-forms-grid-create-report-based-on-grid-layout/CS/WebApplication1/ReportHelper.cs#L64

csharp
foreach(ASPxSummaryItem item in aspxGridView1.GroupSummary) {
    GridViewColumn col = aspxGridView1.Columns[item.FieldName];
    if(col != null) {

xaf-how-to-extend-the-application-model/CS/ExtendModel.Module.Web/Controllers/WebGroupFooterViewController.cs#L25

csharp
foreach (ASPxSummaryItem currentItem in gridView.GroupSummary) {
    if (currentItem.FieldName == fieldName) {
        currentItem.ShowInGroupFooterColumn = modelColumn.Caption.ToUpper();

asp-net-mvc-grid-create-report-based-on-grid-layout/CS/E4755/Models/MVCxGridViewState.cs#L89

csharp
public MVCxSummaryItemState(ASPxSummaryItem item) {
    FieldName = item.FieldName;
    ShowInColumn = item.ShowInColumn;

asp-net-web-forms-grid-create-report-based-on-grid-layout/VB/WebApplication1/ReportHelper.vb#L66

vb
For Each item As ASPxSummaryItem In aspxGridView1.GroupSummary
    Dim col As GridViewColumn = aspxGridView1.Columns(item.FieldName)
    If col IsNot Nothing Then

xaf-how-to-extend-the-application-model/VB/ExtendModel.Module.Web/Controllers/WebGroupFooterViewController.vb#L26

vb
For Each currentItem As ASPxSummaryItem In gridView.GroupSummary
    If currentItem.FieldName = fieldName Then
        currentItem.ShowInGroupFooterColumn = modelColumn.Caption.ToUpper()

asp-net-mvc-grid-create-report-based-on-grid-layout/VB/E4755/Models/MVCxGridViewState.vb#L183

vb
Public Sub New(ByVal item As ASPxSummaryItem)
    FieldName = item.FieldName
    ShowInColumn = item.ShowInColumn

See Also

Card View

Online Demo: Grid - Grid Totals

Grid View

Online Demo: Card View - Total Summary

Vertical Grid

Online Demo: Vertical Grid - Total Summary

ASPxSummaryItemBase Class

ASPxSummaryItemBase Members

DevExpress.Web Namespace