Skip to main content
Row

PivotFieldReferenceBase.MoveUp() Method

Moves the field to the previous position within the collection which represents the PivotTable area where this field is currently shown.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v23.2.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

void MoveUp()

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
MoveUp Moves the field one position up in the area.
PivotFieldReferenceBase.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 up in the row axis area.

View Example

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 "Category" field one position up in the row area.
pivotTable.RowFields("Category").MoveUp()

The following code snippets (auto-collected from DevExpress Examples) contain references to the MoveUp() 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.

See Also