This example demonstrates how to synchronize two ASPxPivotGrid controls to emulate the Show Others feature. To accomplish this task, it is necessary to place two equal pivot grids onto the same page. One of them will be the main pivot, which end-users will use. In this pivot, the PivotGridFieldBase.TopValueCount property of the "Product" field should be set. The second ASPxPivotGrid control ("*_Source") will be hidden (Visible = "False"). We will use this pivot to get values regardless of the PivotGridFieldBase.TopValueCount property. The Other value will be displayed by using the ASPxPivotGrid.CellTemplate property.
Here are short comments on the main function that is used on the web page:
1. void SyncPivots(ASPxPivotGrid source, ASPxPivotGrid visiblePivot) - Synchronizes ASPxPivotGrid controls state.
2. bool ShouldDisplaySecondValue(PivotGridCellTemplateItem cell) - Checks whether the Others value should be shown for a current cell.
3. private object GetTotalValue(PivotGridCellTemplateItem c, ASPxPivotGrid sourcePivotGrid) - Gets a value from the source pivot grid.
4. private Table CreateTable(string topText, string totalText) - Creates a table that is used for displaying two values in one cell.
Please note that the attached project works with the Adventure Works Cube provided along with the MS Analysis Services installation. However, it can be used with any other OLAP cube.