Back to Devexpress

FixedFieldValueCondition Class

corelibraries-devexpress-dot-xtrapivotgrid-ec5d20f5.md

latest2.9 KB
Original Source

FixedFieldValueCondition Class

A condition used to identify the column to pin.

Namespace : DevExpress.XtraPivotGrid

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

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

Declaration

csharp
public class FixedFieldValueCondition :
    IFieldCondition
vb
Public Class FixedFieldValueCondition
    Implements IFieldCondition

Remarks

Conditions are stored in the FixedFieldValueConditionCollection. Each condition consists of the field that is located in the column area and its value.

Follow the steps below to add a condition:

  1. Create the condition (the FixedFieldValueCondition instance).
  2. Specify a field and its value to define the column to be pinned. If you specify no conditions, the “Grand Total” column is pinned.
  3. Add the created condition to the Conditions collection.

The code snippet below illustrates how to pin the fieldQuantity field values that belong to the February 2015 interval.

csharp
using DevExpress.XtraPivotGrid;

//...

public Form1() {
var info = new FixedFieldValue(fieldQuantity);
info.Conditions.Add(
    new FixedFieldValueCondition(fieldYear, new DateTime(2015, 2, 1)));
pivotGridControl1.FixedColumnFieldValues.Add(info);
}
vb
Imports DevExpress.XtraPivotGrid

'...

Public Sub New()
Dim info = New FixedFieldValue(fieldQuantity)
info.Conditions.Add(New FixedFieldValueCondition(fieldYear, New DateTime(2015, 2, 1)))
pivotGridControl1.FixedColumnFieldValues.Add(info)
End Sub

If you specify no conditions, the “Grand Total” column is pinned.

csharp
pivotGridControl1.FixedColumnFieldValues.Add(new FixedFieldValue(fieldQuantity));
vb
pivotGridControl1.FixedColumnFieldValues.Add(New FixedFieldValue(fieldQuantity))

Inheritance

Object FixedFieldValueCondition

See Also

FixedFieldValueCondition Members

DevExpress.XtraPivotGrid Namespace