Back to Devexpress

RankBinding Class

wpf-devexpress-dot-xpf-dot-pivotgrid-9844e7a1.md

latest3.4 KB
Original Source

RankBinding Class

Defines the calculation of a ranking in the window.

Namespace : DevExpress.Xpf.PivotGrid

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

NuGet Package : DevExpress.Wpf.PivotGrid

Declaration

csharp
public class RankBinding :
    CalculationBinding
vb
Public Class RankBinding
    Inherits CalculationBinding

Remarks

To bind a Pivot Grid field to the result of the calculation in Optimized mode, follow the steps listed below.

  1. Create an instance of the RankBinding class with the Source property set to the DevExpress.XtraPivotGrid.DataBindingBase descendant instance.
  2. Specify the window frame.
  3. Assign the RankBinding instance to the PivotGridField.DataBinding property.

The example below shows how to use RankBinding to rank sales by month for the year.

View Example: Pivot Grid Optimized Mode - Field Calculation Data Binding

xaml
<dxpg:PivotGridControl
<!-- ... -->
    DataProcessingEngine="Optimized"
    <!-- ... -->
    <dxpg:PivotGridControl.Fields>
    <!-- ... -->
        <dxpg:PivotGridField
            Area="DataArea"
            AreaIndex="1"
            Caption="Rank"
            Name="fieldRank">
            <dxpg:PivotGridField.DataBinding>
                <dxpg:RankBinding
                    Order="Descending"
                    PartitioningCriteria="ColumnValueAndRowParentValue"
                    RankType="Unique">
                    <dxpg:RankBinding.Source>
                        <dxpg:DataSourceColumnBinding ColumnName="Extended Price" />
                    </dxpg:RankBinding.Source>
                </dxpg:RankBinding>
            </dxpg:PivotGridField.DataBinding>
        </dxpg:PivotGridField>
        <!-- ... -->
    </dxpg:PivotGridControl.Fields>
</dxpg:PivotGridControl>

Inheritance

Object DispatcherObject DependencyObject ContentElement FrameworkContentElement DXFrameworkContentElement DataBinding CalculationBinding RankBinding

See Also

RankBinding Members

Bind Pivot Grid Fields to Window Calculations

DevExpress.Xpf.PivotGrid Namespace