Skip to main content

Rank Types

  • 4 minutes to read

Rank summary display types are designed to display ranks of summary values in their columns and rows. To employ rank display values, use RankBinding in Optimized mode.

The following rank types are available:

Rank in a Column: Largest to Smallest

The summary value’s rank in its column, where the largest value in the column is ranked as 1, and corresponding higher ranks are assigned to all values that are less than the largest value.

SummaryDisplayType_RankInColumnLargestToSmallest

Example

void ItemClick(object sender, EventArgs e) {
// ...
    PivotGridField field = item.Tag as PivotGridField;
    DataSourceColumnBinding sourceBinding = new DataSourceColumnBinding("Number");
    PivotSummaryDisplayType newValue = (PivotSummaryDisplayType)Enum.Parse(typeof(PivotSummaryDisplayType), 
       item.Caption);
    switch(newValue) {
    // ...
       case PivotSummaryDisplayType.RankInColumnLargestToSmallest:
           field.DataBinding = new RankBinding(
               sourceBinding,
               CalculationPartitioningCriteria.ColumnValue,
               RankType.Dense, PivotSortOrder.Descending);
           break;
    // ...      
    }
    field.Tag = newValue;
}

Note

Set PivotGridFieldBase.SummaryDisplayType to RankInColumnLargestToSmallest in Legacy, LegacyOptimized, and OLAP modes.

Rank in a Column: Smallest to Largest

Displays the summary value’s rank among other values in the same column, where the lowest value in the column is ranked as 1 and ranks increase depending on the other values.

SummaryDisplayType_RankInColumnSmallestToLargest

Example

void ItemClick(object sender, EventArgs e) {
// ...
    PivotGridField field = item.Tag as PivotGridField;
    DataSourceColumnBinding sourceBinding = new DataSourceColumnBinding("Number");
    PivotSummaryDisplayType newValue = (PivotSummaryDisplayType)Enum.Parse(typeof(PivotSummaryDisplayType), 
       item.Caption);
    switch(newValue) {
    // ...
       case PivotSummaryDisplayType.RankInColumnSmallestToLargest:
           field.DataBinding = new RankBinding(
               sourceBinding,
               CalculationPartitioningCriteria.ColumnValue,
               RankType.Dense, PivotSortOrder.Ascending);
           break;
    // ...      
    }
    field.Tag = newValue;
}

Note

Set PivotGridFieldBase.SummaryDisplayType to RankInColumnSmallestToLargest in Legacy, LegacyOptimized, and OLAP modes.

Rank in a Row: Largest to Smallest

Displays the summary value’s rank among other values in the same row, where the largest value in the row is ranked as 1, and corresponding higher ranks are assigned to all values that are less than the largest value.

SummaryDisplayType_RankInRowLargestToSmallest

Example

void ItemClick(object sender, EventArgs e) {
// ...
    PivotGridField field = item.Tag as PivotGridField;
    DataSourceColumnBinding sourceBinding = new DataSourceColumnBinding("Number");
    PivotSummaryDisplayType newValue = (PivotSummaryDisplayType)Enum.Parse(typeof(PivotSummaryDisplayType), 
       item.Caption);
    switch(newValue) {
    // ...
       case PivotSummaryDisplayType.RankInRowLargestToSmallest:
           field.DataBinding = new RankBinding(
               sourceBinding,
               CalculationPartitioningCriteria.RowValue,
               RankType.Dense, PivotSortOrder.Descending);
           break;
    // ...      
    }
    field.Tag = newValue;
}

Note

Set PivotGridFieldBase.SummaryDisplayType to RankInRowLargestToSmallest in Legacy, LegacyOptimized, and OLAP modes.

Rank in a Row: Smallest to Largest

Displays the summary value’s rank among other values in the same row, where the lowest value in the row is ranked as 1, and corresponding higher ranks are assigned to all values that exceed the lowest value.

SummaryDisplayType_RankInRowSmallestToLargest

Example

void ItemClick(object sender, EventArgs e) {
// ...
    PivotGridField field = item.Tag as PivotGridField;
    DataSourceColumnBinding sourceBinding = new DataSourceColumnBinding("Number");
    PivotSummaryDisplayType newValue = (PivotSummaryDisplayType)Enum.Parse(typeof(PivotSummaryDisplayType), 
       item.Caption);
    switch(newValue) {
    // ...
       case PivotSummaryDisplayType.RankInRowSmallestToLargest:
           field.DataBinding = new RankBinding(
               sourceBinding,
               CalculationPartitioningCriteria.ColumnValue,
               RankType.Dense, PivotSortOrder.Ascending);
           break;
    // ...      
    }
    field.Tag = newValue;
}

Note

Set PivotGridFieldBase.SummaryDisplayType to RankInRowSmallestToLargest in Legacy, LegacyOptimized, and OLAP modes.

See Also