Back to Devexpress

PivotGridFieldBase.UnboundExpressionMode Property

corelibraries-devexpress-dot-xtrapivotgrid-dot-pivotgridfieldbase-d72dac19.md

latest4.9 KB
Original Source

PivotGridFieldBase.UnboundExpressionMode Property

Gets or sets how the specified data field’s unbound expression is calculated.

Namespace : DevExpress.XtraPivotGrid

Assembly : DevExpress.PivotGrid.v25.2.Core.dll

NuGet Packages : DevExpress.PivotGrid.Core, DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(UnboundExpressionMode.Default)]
public UnboundExpressionMode UnboundExpressionMode { get; set; }
vb
<DefaultValue(UnboundExpressionMode.Default)>
Public Property UnboundExpressionMode As UnboundExpressionMode

Property Value

TypeDefaultDescription
UnboundExpressionModeDefault

An UnboundExpressionMode object that specifies how the specified data field’s unbound expression is calculated.

|

Available values:

NameDescription
Default

The default parameter value.

| | UseSummaryValues |

An unbound expression is calculated against summary values.

| | DataSource |

An unbound expression is calculated against each data source record, and then the resulting values are summarized.

| | UseAggregateFunctions |

An unbound expression is calculated using aggregates.

|

Remarks

Note

This member is not supported in Optimized, OLAP, and Server modes. Use ExpressionDataBinding/OlAPExpressionBinding instead.

By default, the unbound expression is calculated against each data source record, and then the resulting values are summarized. If necessary, you can calculate unbound field values on the visualization (or summary) level. You can also use a specified set of summary functions (such as Sum, Avg, etc.) to summarize data source records. The UnboundExpressionMode property allows you to specify the mode used to calculate unbound field values.

To learn more, see Unbound Fields.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the UnboundExpressionMode 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.

winforms-pivotgrid--display-the-difference-of-income-and-outlay-in-totals/CS/PivotGridCustomSummaryExample/Form1.cs#L76

csharp
fieldValueTotal.UnboundType = DevExpress.Data.UnboundColumnType.Decimal;
    fieldValueTotal.UnboundExpressionMode = UnboundExpressionMode.UseAggregateFunctions;
}

winforms-pivotgrid--display-the-difference-of-income-and-outlay-in-totals/VB/PivotGridCustomSummaryExample/Form1.vb#L62

vb
fieldValueTotal.UnboundType = DevExpress.Data.UnboundColumnType.Decimal
    fieldValueTotal.UnboundExpressionMode = UnboundExpressionMode.UseAggregateFunctions
End Sub

See Also

PivotGridFieldBase Class

PivotGridFieldBase Members

DevExpress.XtraPivotGrid Namespace