PivotCellEventArgsBase<TField, TData, TCustomTotal>.RowValueType Property
Gets the type of row that contains the processed cell.
Namespace: DevExpress.XtraPivotGrid
Assembly: DevExpress.PivotGrid.v24.2.Core.dll
NuGet Packages: DevExpress.PivotGrid.Core, DevExpress.Win.Navigation
#Declaration
public PivotGridValueType RowValueType { get; }
#Property Value
Type | Description |
---|---|
Pivot |
A Pivot |
Available values:
Name | Description |
---|---|
Value | Corresponds to a field value. |
Total | Corresponds to an automatic total. |
Grand |
Corresponds to a grand total. |
Custom |
Corresponds to a custom total. |
#Remarks
Use the RowValueType
property to identify whether the processed cell resides within the grand total row, total row, etc.
#Example
This example demonstrates how to handle the CustomCellValue event to hide field row totals and grand totals. The total values remain hidden when you expand or collapse field values.
private void pivotGridControl1_CustomCellValue(object sender, PivotCellValueEventArgs e) {
if (e.DataField == fieldLowLevel) {
PivotGridField lastLevelField =
pivotGridControl1.GetFieldsByArea(PivotArea.RowArea).Last();
if(e.RowValueType == PivotGridValueType.Total
|| e.RowValueType == PivotGridValueType.GrandTotal
|| e.RowField != lastLevelField)
e.Value = null;
}
}