# GrapeCity.Spreadsheet.Commands.PivotTables.PivotTableCommand.UpdateDataFieldSettings

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Spreadsheet_Commands_PivotTables_PivotTableCommand_UpdateDataFieldSettings_" data-uid="GrapeCity.Spreadsheet.Commands.PivotTables.PivotTableCommand.UpdateDataFieldSettings*">UpdateDataFieldSettings Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Spreadsheet_Commands_PivotTables_PivotTableCommand_UpdateDataFieldSettings_" data-uid="GrapeCity.Spreadsheet.Commands.PivotTables.PivotTableCommand.UpdateDataFieldSettings*"></a>
<h4 id="GrapeCity_Spreadsheet_Commands_PivotTables_PivotTableCommand_UpdateDataFieldSettings_GrapeCity_Spreadsheet_PivotTables_IPivotTable_GrapeCity_Spreadsheet_PivotTables_IPivotField_System_Nullable_GrapeCity_Spreadsheet_PivotTables_ConsolidationFunction__System_Nullable_GrapeCity_Spreadsheet_PivotTables_PivotFieldCalculation__" data-uid="GrapeCity.Spreadsheet.Commands.PivotTables.PivotTableCommand.UpdateDataFieldSettings(GrapeCity.Spreadsheet.PivotTables.IPivotTable,GrapeCity.Spreadsheet.PivotTables.IPivotField,System.Nullable{GrapeCity.Spreadsheet.PivotTables.ConsolidationFunction},System.Nullable{GrapeCity.Spreadsheet.PivotTables.PivotFieldCalculation})">UpdateDataFieldSettings(IPivotTable, IPivotField, ConsolidationFunction?, PivotFieldCalculation?)</h4>
<div class="markdown level1 summary"><p>Initializes a new command to modify <span class="xref">GrapeCity.Spreadsheet.Commands.PivotTables.PivotTableCommand.PivotTable</span> data field settings.</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 UpdateDataFieldSettings(IPivotTable pivotTable, IPivotField pivotField, ConsolidationFunction? function = null, PivotFieldCalculation? calculation = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function UpdateDataFieldSettings(pivotTable As IPivotTable, pivotField As IPivotField, Optional [function] As ConsolidationFunction? = Nothing, Optional calculation As PivotFieldCalculation? = 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 PivotTable report</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></td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.PivotTables.ConsolidationFunction.html">ConsolidationFunction</a>?</td>
      <td><span class="parametername">function</span></td>
      <td><p>A <a class="xref" href="GrapeCity.Spreadsheet.PivotTables.ConsolidationFunction.html">ConsolidationFunction</a> value that represents the subtotal function of the specified field.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.PivotTables.PivotFieldCalculation.html">PivotFieldCalculation</a>?</td>
      <td><span class="parametername">calculation</span></td>
      <td><p>A <a class="xref" href="GrapeCity.Spreadsheet.PivotTables.PivotFieldCalculation.html">PivotFieldCalculation</a> value that represents the type of calculation performed by the specified field.</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>
