corelibraries-devexpress-dot-xtrapivotgrid-dot-pivotcelleventargsbase-3-c0552a2b.md
Gets the innermost row field that corresponds to the processed cell.
Namespace : DevExpress.XtraPivotGrid
Assembly : DevExpress.PivotGrid.v25.2.Core.dll
NuGet Packages : DevExpress.PivotGrid.Core, DevExpress.Win.Navigation
public TField RowField { get; }
Public ReadOnly Property RowField As TField
| Type | Description |
|---|---|
| TField |
A T object that is the row field.
|
If the processed cell resides within a Row Grand Total, the RowField property returns null. Otherwise, this property returns the innermost row field that corresponds to the processed cell.
Use the e.GetFieldValue method to get any field’s value for the processed cell.
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.
View Example: Pivot Grid for WinForms - Hide Row Totals
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;
}
}
Private Sub pivotGridControl1_CustomCellValue(ByVal sender As Object, ByVal e As PivotCellValueEventArgs) Handles pivotGridControl1.CustomCellValue
If e.DataField Is fieldLowLevel Then
Dim lastLevelField As PivotGridField = pivotGridControl1.GetFieldsByArea(PivotArea.RowArea).Last()
If e.RowValueType = PivotGridValueType.Total OrElse e.RowValueType = PivotGridValueType.GrandTotal OrElse e.RowField IsNot lastLevelField Then
e.Value = Nothing
End If
End If
End Sub
See Also
XtraPivotGrid.PivotCellEventArgsBase
XtraPivotGrid.PivotCellEventArgsBase
XtraPivotGrid.PivotCellEventArgsBase
PivotCellEventArgsBase<TField, TData, TCustomTotal> Class