PivotFieldReferenceBase.MoveDown() Method
Moves the field to the next position within the collection which represents the PivotTable area where this field is currently shown.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v24.1.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
Declaration
Remarks
After you create a PivotTable report or load an existing pivot table, you can rearrange fields shown in a specific area of the PivotTable report. To do this, access the required field you wish to move by its name in the collection representing the appropriate PivotTable area where this field is currently shown, and then call one of the following PivotFieldReferenceBase methods.
Method | Description |
---|---|
PivotFieldReferenceBase.MoveUp | Moves the field one position up in the area. |
MoveDown | Moves the field one position down in the area. |
PivotFieldReferenceBase.MoveToBeginning | Moves the field to the beginning of the area. |
PivotFieldReferenceBase.MoveToEnd | Moves the field to the end of the area. |
The example below demonstrates how to move the row field one position down in the row axis area.
Dim worksheet As Worksheet = workbook.Worksheets("Report3")
workbook.Worksheets.ActiveWorksheet = worksheet
' Access the pivot table by its name in the collection.
Dim pivotTable As PivotTable = worksheet.PivotTables("PivotTable1")
' Move the "Region" field one position down in the row area.
pivotTable.RowFields("Region").MoveDown()
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the MoveDown() 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.