# GrapeCity.Spreadsheet.ExternalVariable.OnDirtying

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Spreadsheet_ExternalVariable_OnDirtying_" data-uid="GrapeCity.Spreadsheet.ExternalVariable.OnDirtying*">OnDirtying Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Spreadsheet_ExternalVariable_OnDirtying_" data-uid="GrapeCity.Spreadsheet.ExternalVariable.OnDirtying*"></a>
<h4 id="GrapeCity_Spreadsheet_ExternalVariable_OnDirtying" data-uid="GrapeCity.Spreadsheet.ExternalVariable.OnDirtying">OnDirtying()</h4>
<div class="markdown level1 summary"><p>Designates this external variable to be recalculated when the next recalculation occurs.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">protected virtual bool OnDirtying()</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected Overridable Function OnDirtying() As Boolean</code></pre>
</div>
<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="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><p><code>true</code> if the external variable require executing its own logic (invoke <a class="xref" href="GrapeCity.Spreadsheet.ExternalVariable.OnDirtied.html#GrapeCity_Spreadsheet_ExternalVariable_OnDirtied">OnDirtied()</a>) after the calculation engine is ready; otherwise, <code>false</code>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_Spreadsheet_ExternalVariable_OnDirtying_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Accessing calculation engine (like get value of external variable) isn't available inside this function.</p>
</div>
</div>
