Allows you to replace cell values with custom ones.
public event PivotCellValueEventHandler CustomCellValue
Public Event CustomCellValue As PivotCellValueEventHandler
The CustomCellValue event's data class is PivotCellValueEventArgs. The following properties provide information specific to this event:
|ColumnCustomTotal||Gets the custom total to which the processed cell's column corresponds. Inherited from PivotCellBaseEventArgs.|
|ColumnField||Gets the innermost column field which corresponds to the processed cell. Inherited from PivotCellBaseEventArgs.|
|ColumnFieldIndex||This member supports the internal infrastructure and is not intended to be used directly from your code. Inherited from PivotCellBaseEventArgs.|
|ColumnIndex||Gets the visual index of the column that contains the processed cell. Inherited from PivotCellBaseEventArgs.|
|ColumnValueType||Gets the type of the cell's column header. Inherited from PivotCellBaseEventArgs.|
|DataField||Gets the data field which identifies the column where the processed cell resides. Inherited from PivotCellBaseEventArgs.|
|DisplayText||Gets the display text of the cell currently being processed. Inherited from PivotCellBaseEventArgs.|
|Focused||Gets whether the processed cell is the focused cell. Inherited from PivotCellBaseEventArgs.|
|Handled||Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route. Inherited from RoutedEventArgs.|
|OriginalSource||Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class. Inherited from RoutedEventArgs.|
|RoutedEvent||Gets or sets the RoutedEvent associated with this RoutedEventArgs instance. Inherited from RoutedEventArgs.|
|RowCustomTotal||Gets the custom total to which the processed cell's row corresponds. Inherited from PivotCellBaseEventArgs.|
|RowField||Gets the innermost row field which corresponds to the processed cell. Inherited from PivotCellBaseEventArgs.|
|RowFieldIndex||This member supports the internal infrastructure and is not intended to be used directly from your code. Inherited from PivotCellBaseEventArgs.|
|RowIndex||Gets the visual index of the row that contains the processed cell. Inherited from PivotCellBaseEventArgs.|
|RowValueType||Gets the type of the cell's row header. Inherited from PivotCellBaseEventArgs.|
|Selected||Gets whether the processed cell is selected. Inherited from PivotCellBaseEventArgs.|
|Source||Gets or sets a reference to the object that raised the event. Inherited from RoutedEventArgs.|
|SummaryType||Gets the type of summary calculated in the current cell. Inherited from PivotCellBaseEventArgs.|
|SummaryValue||Gets the summary value currently being processed. Inherited from PivotCellBaseEventArgs.|
|Value||Gets or sets the processed cell's value.|
The CustomCellValue event fires for each cell after the control structure is calculated. You can handle the event to replace the calculated cell values with custom ones. Use the event parameter's PivotCellBaseEventArgs.SummaryValue property to obtain the summary value calculated for the cell. The custom cell value should be provided to the PivotCellValueEventArgs.Value property. To specify whether to run the default event handler, use the event parameter's Handled property. If it is set to false, the custom cell value is ignored.
Use the event parameter's PivotCellBaseEventArgs.ColumnField, PivotCellBaseEventArgs.DataField and PivotCellBaseEventArgs.RowField properties to obtain the column, data and row fields that correspond to the processed cell, respectively. The PivotCellBaseEventArgs.ColumnIndex and PivotCellBaseEventArgs.RowIndex properties are used to obtain the visual indices of the column and row that contain the cell.
You can also provide custom display text by handling the PivotGridControl.CustomCellDisplayText event, which is raised after the CustomCellValue event.
Noe that you cannot use values provided by the CustomCellValue event to sort data because at this moment sorting is already completed. In this case, use the PivotGridControl.CustomSummary event instead.