PivotCustomDrawCellBaseEventArgs.GetColumnGrandTotal(Object[], PivotGridField) Method
Returns a Column Grand Total value calculated for the specified row field values, against the specified data field.
Namespace: DevExpress.XtraPivotGrid
Assembly: DevExpress.XtraPivotGrid.v24.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
rowValues | Object[] | An array of row field values for which the required Column Grand Total is calculated. |
dataField | PivotGridField | A PivotGridField object that specifies the data field, against which the required Column Grand Total is calculated. |
Returns
Type | Description |
---|---|
Object | The Column Grand Total value calculated for the specified row field values, against the specified data field. |
Remarks
Consider the pivot grid displayed in the image below.
The following table illustrates how to use the GetColumnGrandTotal method to obtain specific grand total values.
Cell | C# | Visual Basic |
---|---|---|
Red | e.GetColumnGrandTotal(new object[] {1995, "Beverages"}, fieldProductSales); |
e.GetColumnGrandTotal(New Object() {1995, "Beverages"}, fieldProductSales) |
Green | e.GetColumnGrandTotal(new object[] {1995}, fieldProductSales); |
e.GetColumnGrandTotal(New Object() {1995}, fieldProductSales) |
Blue | e.GetColumnGrandTotal(null, fieldProductSales); |
e.GetColumnGrandTotal(Nothing, fieldProductSales) |
For more information on Grand Totals, see Grand Totals.
Note
If you call the GetColumnGrandTotal method while an asynchronous operation is being performed, an exception will be thrown. To determine whether the operation is in progress, use the pivot grid’s IThreadSafeAccessible.IsAsyncInProgress property. For more information, see Asynchronous Mode.