windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridfield-d2a8c4a1.md
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
[DefaultValue("")]
[DXCategory("Data")]
public string UnboundExpression { get; set; }
<DXCategory("Data")>
<DefaultValue("")>
Public Property UnboundExpression As String
| Type | Default | Description |
|---|---|---|
| String | String.Empty |
A String that specifies an expression used to evaluate values for the current field.
|
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.
PivotGridField fieldValueTotal = pivotGridControl1.Fields.GetFieldByName("fieldValueTotal") ?? CreateSavingsField();
fieldValueTotal.UnboundExpression = "Sum(Iif([Type]='Income', [Value], -[Value]))";
fieldValueTotal.UnboundType = DevExpress.Data.UnboundColumnType.Decimal;
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