windowsforms-devexpress-dot-xtrapivotgrid-2776eb66.md
Defines the calculation of a ranking in the window.
Namespace : DevExpress.XtraPivotGrid
Assembly : DevExpress.XtraPivotGrid.v25.2.dll
NuGet Package : DevExpress.Win.PivotGrid
public class RankBinding :
RankBindingBase
Public Class RankBinding
Inherits RankBindingBase
Follow the steps listed below to bind a PivotGrid field to the result of the calculation in Optimized mode.
The following code snippet illustrates the use of the Data Binding API to calculate a rank for each value in the column in a pivot field group:
Run Demo: Optimized Mode - Field Calculation Bindings
[CodeExampleDataFile("nwind.xml")]
public static void PivotCalculations(PivotGridControl pivotGridControl) {
productAmountBinding, CalculationPartitioningCriteria.ColumnValue, DifferenceTarget.Previous, DifferenceType.Absolute);
//Calculate a rank for each value in the column in a pivot field group.
pivotGridControl.Fields["fRank"].DataBinding = new RankBinding(
pivotGridControl.BestFit();
Public Sub PivotCalculations(ByVal pivotGridControl As PivotGridControl)
Dim productAmountBinding As New DataSourceColumnBinding("ExtendedPrice")
pivotGridControl.Fields("fRank").DataBinding = New RankBinding(productAmountBinding, CalculationPartitioningCriteria.ColumnValueAndRowParentValue, RankType.Unique, PivotSortOrder.Descending)
End Sub
Object DataBindingBase CalculationBindingBase RankBindingBase RankBinding
See Also