RankBinding Class
Defines the calculation of a ranking in the window.
Namespace: DevExpress.XtraPivotGrid
Assembly: DevExpress.XtraPivotGrid.v24.2.dll
Declaration
Remarks
Follow the steps listed below to bind a PivotGrid field to the result of the calculation in Optimized mode.
- Create an instance of the RankBinding class.
- Set the Source property to the DataBindingBase descendant instance.
- Specify the window frame.
- Assign the RankBinding instance to the PivotGridField.DataBinding property.
Example
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:
public static void PivotCalculations(PivotGridControl pivotGridControl) {
DataSourceColumnBinding productAmountBinding = new DataSourceColumnBinding("ExtendedPrice");
//Calculate a rank for each value in the column in a pivot field group.
pivotGridControl.Fields["fRank"].DataBinding = new RankBinding(
productAmountBinding, CalculationPartitioningCriteria.ColumnValueAndRowParentValue, RankType.Unique, PivotSortOrder.Descending);
}
Inheritance
See Also