# C1.PivotEngine.C1PivotEngine.BeginUpdate

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_PivotEngine_C1PivotEngine_BeginUpdate_" data-uid="C1.PivotEngine.C1PivotEngine.BeginUpdate*">BeginUpdate Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_PivotEngine_C1PivotEngine_BeginUpdate_" data-uid="C1.PivotEngine.C1PivotEngine.BeginUpdate*"></a>
<h4 id="C1_PivotEngine_C1PivotEngine_BeginUpdate" data-uid="C1.PivotEngine.C1PivotEngine.BeginUpdate">BeginUpdate()</h4>
<div class="markdown level1 summary"><p>Suspend automatic updates to the output table while defining the PivotEngine view.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void BeginUpdate()</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub BeginUpdate()</code></pre>
</div>
<h5 id="C1_PivotEngine_C1PivotEngine_BeginUpdate_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The <span class="xref">C1.PivotEngine.PivotEngine</span> updates the output table whenever the
fields that make up the PivotEngine view change.
Before making multiple changes (such as defining a new PivotEngine view),
you can increase performance by enclosing the changes between calls to
<a class="xref" href="C1.PivotEngine.C1PivotEngine.BeginUpdate.html#C1_PivotEngine_C1PivotEngine_BeginUpdate">BeginUpdate()</a> and <a class="xref" href="C1.PivotEngine.C1PivotEngine.EndUpdate.html#C1_PivotEngine_C1PivotEngine_EndUpdate">EndUpdate()</a>.</p>
</div>
<h5 id="C1_PivotEngine_C1PivotEngine_BeginUpdate_examples">Examples</h5>
<p>The code below shows how to define a new PivotEngine view efficiently by
enclosing the changes between calls to <a class="xref" href="C1.PivotEngine.C1PivotEngine.BeginUpdate.html#C1_PivotEngine_C1PivotEngine_BeginUpdate">BeginUpdate()</a> and
<a class="xref" href="C1.PivotEngine.C1PivotEngine.EndUpdate.html#C1_PivotEngine_C1PivotEngine_EndUpdate">EndUpdate()</a>.</p>
<pre><code class="lang-csharp">// set data source (populates Fields list)
fp.DataSource = GetDataTable();

// prevent updates while building PivotEngine view
fp.BeginUpdate();

// show countries in rows
fp.RowFields.Add("Country");

// show categories and products in columns
fp.ColumnFields.Add("Category");
fp.ColumnFields.Add("Product");

// show total sales in cells
fp.ValueFields.Add("Sales");

// done defining the view
fp.EndUpdate();</code></pre>

</div>
