Back to Devexpress

PivotCustomFieldValueCellsEventArgsBase.SetGrandTotalLocation(Boolean, GrandTotalLocation) Method

corelibraries-devexpress-dot-xtrapivotgrid-dot-data-dot-pivotcustomfieldvaluecellseventargsbase-dot-setgrandtotallocation-x28-system-dot-boolean-devexpress-dot-xtrapivotgrid-dot-data-dot-grandtotallocation-x29.md

latest4.3 KB
Original Source

PivotCustomFieldValueCellsEventArgsBase.SetGrandTotalLocation(Boolean, GrandTotalLocation) Method

Sets the location of Grand Total columns or rows to the specified value.

Namespace : DevExpress.XtraPivotGrid.Data

Assembly : DevExpress.PivotGrid.v25.2.Core.dll

NuGet Packages : DevExpress.PivotGrid.Core, DevExpress.Win.Navigation

Declaration

csharp
public void SetGrandTotalLocation(
    bool isColumn,
    GrandTotalLocation location
)
vb
Public Sub SetGrandTotalLocation(
    isColumn As Boolean,
    location As GrandTotalLocation
)

Parameters

NameTypeDescription
isColumnBoolean

true to set the location of Grand Total columns; false to set the location of Grand Total rows.

| | location | GrandTotalLocation |

A GrandTotalLocation enumeration member that specifies the location of Grand Totals.

|

Remarks

To obtain the current location of Grand Totals, use the PivotCustomFieldValueCellsEventArgsBase.GetGrandTotalLocation method.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SetGrandTotalLocation(Boolean, GrandTotalLocation) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-dashboard-pivot-custom-export/CS/WinformsExport/Form1.cs#L123

csharp
void PivotCustomFieldValueCellsResults(object sender, PivotCustomFieldValueCellsEventArgs e) {
    e.SetGrandTotalLocation(true, DevExpress.XtraPivotGrid.Data.GrandTotalLocation.Near);
}

winforms-dashboard-pivot-custom-export/VB/WinFormsExport/Form1.vb#L128

vb
Private Sub PivotCustomFieldValueCellsResults(ByVal sender As Object, ByVal e As PivotCustomFieldValueCellsEventArgs)
    e.SetGrandTotalLocation(True, DevExpress.XtraPivotGrid.Data.GrandTotalLocation.Near)
End Sub

See Also

GetGrandTotalLocation(Boolean)

PivotCustomFieldValueCellsEventArgsBase Class

PivotCustomFieldValueCellsEventArgsBase Members

DevExpress.XtraPivotGrid.Data Namespace