The following code shows how to disable data editing for total cells. This is accomplished by handling the PivotGridControl.ShowingEditor event. When handling this event, the type of the current cell can be identified via the PivotCellEventArgsBase<TField, TData, TCustomTotal>.ColumnValueType and PivotCellEventArgsBase<TField, TData, TCustomTotal>.RowValueType parameters.
using DevExpress.XtraPivotGrid;
private void pivotGridControl1_ShowingEditor(object sender, CancelPivotCellEditEventArgs e) {
if (e.RowValueType != PivotGridValueType.Value || e.ColumnValueType != PivotGridValueType.Value)
e.Cancel = true;
}
Imports DevExpress.XtraPivotGrid
Private Sub PivotGridControl1_ShowingEditor(ByVal sender As System.Object, _
ByVal e As CancelPivotCellEditEventArgs) Handles PivotGridControl1.ShowingEditor
If e.RowValueType <> PivotGridValueType.Value OrElse e.ColumnValueType <> PivotGridValueType.Value Then
e.Cancel = True
End If
End Sub