Back to Devexpress

PivotGridField.UnboundExpression Property

windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridfield-d2a8c4a1.md

latest3.4 KB
Original Source

PivotGridField.UnboundExpression Property

Gets or sets an expression used to evaluate values for the current unbound field.

Namespace : DevExpress.XtraPivotGrid

Assembly : DevExpress.XtraPivotGrid.v25.2.dll

NuGet Package : DevExpress.Win.PivotGrid

Declaration

csharp
[DefaultValue("")]
[DXCategory("Data")]
public string UnboundExpression { get; set; }
vb
<DXCategory("Data")>
<DefaultValue("")>
Public Property UnboundExpression As String

Property Value

TypeDefaultDescription
StringString.Empty

A String that specifies an expression used to evaluate values for the current field.

|

Remarks

This member is no longer supported in Optimized, OLAP and Server modes. Use ExpressionDataBinding or OLAPExpressionBinding for OLAP instead.

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

csharp
PivotGridField fieldValueTotal = pivotGridControl1.Fields.GetFieldByName("fieldValueTotal") ?? CreateSavingsField();
fieldValueTotal.UnboundExpression = "Sum(Iif([Type]='Income', [Value], -[Value]))";
fieldValueTotal.UnboundType = DevExpress.Data.UnboundColumnType.Decimal;

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

vb
Dim fieldValueTotal As PivotGridField = If(pivotGridControl1.Fields.GetFieldByName("fieldValueTotal"), CreateSavingsField())
fieldValueTotal.UnboundExpression = "Sum(Iif([Type]='Income', [Value], -[Value]))"
fieldValueTotal.UnboundType = DevExpress.Data.UnboundColumnType.Decimal

See Also

PivotGridField Class

PivotGridField Members

DevExpress.XtraPivotGrid Namespace