# GrapeCity.Spreadsheet.Commands.PivotTables.PivotTableCommand.MovePivotField

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Spreadsheet_Commands_PivotTables_PivotTableCommand_MovePivotField_" data-uid="GrapeCity.Spreadsheet.Commands.PivotTables.PivotTableCommand.MovePivotField*">MovePivotField Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Spreadsheet_Commands_PivotTables_PivotTableCommand_MovePivotField_" data-uid="GrapeCity.Spreadsheet.Commands.PivotTables.PivotTableCommand.MovePivotField*"></a>
<h4 id="GrapeCity_Spreadsheet_Commands_PivotTables_PivotTableCommand_MovePivotField_GrapeCity_Spreadsheet_PivotTables_IPivotTable_GrapeCity_Spreadsheet_PivotTables_IPivotField_GrapeCity_Spreadsheet_PivotTables_IPivotItem_System_Nullable_GrapeCity_Spreadsheet_PivotTables_PivotFieldOrientation__System_Nullable_System_Boolean__System_Nullable_System_Boolean__System_Nullable_System_Boolean__System_Nullable_System_Boolean__" data-uid="GrapeCity.Spreadsheet.Commands.PivotTables.PivotTableCommand.MovePivotField(GrapeCity.Spreadsheet.PivotTables.IPivotTable,GrapeCity.Spreadsheet.PivotTables.IPivotField,GrapeCity.Spreadsheet.PivotTables.IPivotItem,System.Nullable{GrapeCity.Spreadsheet.PivotTables.PivotFieldOrientation},System.Nullable{System.Boolean},System.Nullable{System.Boolean},System.Nullable{System.Boolean},System.Nullable{System.Boolean})">MovePivotField(IPivotTable, IPivotField, IPivotItem, PivotFieldOrientation?, bool?, bool?, bool?, bool?)</h4>
<div class="markdown level1 summary"><p>Initializes a new command to move to a specified <a class="xref" href="GrapeCity.Spreadsheet.PivotTables.IPivotField.html">IPivotField</a> or <a class="xref" href="GrapeCity.Spreadsheet.PivotTables.IPivotItem.html">IPivotItem</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Command MovePivotField(IPivotTable pivotTable, IPivotField pivotField, IPivotItem pivotItem = null, PivotFieldOrientation? orientation = null, bool? beginEnd = null, bool? upDown = null, bool? leftRight = null, bool? toRowsColumns = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function MovePivotField(pivotTable As IPivotTable, pivotField As IPivotField, Optional pivotItem As IPivotItem = Nothing, Optional orientation As PivotFieldOrientation? = Nothing, Optional beginEnd As Boolean? = Nothing, Optional upDown As Boolean? = Nothing, Optional leftRight As Boolean? = Nothing, Optional toRowsColumns As Boolean? = Nothing) As Command</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.PivotTables.IPivotTable.html">IPivotTable</a></td>
      <td><span class="parametername">pivotTable</span></td>
      <td><p>The <a class="xref" href="GrapeCity.Spreadsheet.PivotTables.IPivotTable.html">IPivotTable</a> object.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.PivotTables.IPivotField.html">IPivotField</a></td>
      <td><span class="parametername">pivotField</span></td>
      <td><p>The <a class="xref" href="GrapeCity.Spreadsheet.PivotTables.IPivotField.html">IPivotField</a> object.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.PivotTables.IPivotItem.html">IPivotItem</a></td>
      <td><span class="parametername">pivotItem</span></td>
      <td><p>The <a class="xref" href="GrapeCity.Spreadsheet.PivotTables.IPivotItem.html">IPivotItem</a> object.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.PivotTables.PivotFieldOrientation.html">PivotFieldOrientation</a>?</td>
      <td><span class="parametername">orientation</span></td>
      <td><p>A <a class="xref" href="GrapeCity.Spreadsheet.PivotTables.PivotFieldOrientation.html">PivotFieldOrientation</a> value that represents the location of the field in the specified <a class="xref" href="GrapeCity.Spreadsheet.PivotTables.IPivotTable.html">IPivotTable</a> report.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>?</td>
      <td><span class="parametername">beginEnd</span></td>
      <td><p>A boolean value indicates whether the specified <a class="xref" href="GrapeCity.Spreadsheet.PivotTables.IPivotField.html">IPivotField</a> object will be moved. Set to true to move to the begin position, false to move to the end position.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>?</td>
      <td><span class="parametername">upDown</span></td>
      <td><p>A boolean value indicates whether the specified <a class="xref" href="GrapeCity.Spreadsheet.PivotTables.IPivotField.html">IPivotField</a> object will be moved. Set to true to move to the up position, false to move to the down position.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>?</td>
      <td><span class="parametername">leftRight</span></td>
      <td><p>A boolean value indicates whether the specified <a class="xref" href="GrapeCity.Spreadsheet.PivotTables.IPivotField.html">IPivotField</a> object will be moved. Set to true to move to the left position, false to move to the right position.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>?</td>
      <td><span class="parametername">toRowsColumns</span></td>
      <td><p>A boolean value indicates whether the specified <a class="xref" href="GrapeCity.Spreadsheet.PivotTables.IPivotField.html">IPivotField</a> object's orientation will changed and also position.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.Commands.Command.html">Command</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
