# GrapeCity.Spreadsheet.UI.UIManager.Execute

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Spreadsheet_UI_UIManager_Execute_" data-uid="GrapeCity.Spreadsheet.UI.UIManager.Execute*">Execute Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Spreadsheet_UI_UIManager_Execute_" data-uid="GrapeCity.Spreadsheet.UI.UIManager.Execute*"></a>
<h4 id="GrapeCity_Spreadsheet_UI_UIManager_Execute_System_Object_System_Object_" data-uid="GrapeCity.Spreadsheet.UI.UIManager.Execute(System.Object,System.Object)">Execute(object, object)</h4>
<div class="markdown level1 summary"><p>Execute an UI command.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">protected virtual void Execute(object sender, object data)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected Overridable Sub Execute(sender As Object, data As Object)</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="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">sender</span></td>
      <td><p>The sender that raise the command.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">data</span></td>
      <td><p>The contextual data.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Spreadsheet_UI_UIManager_Execute_" data-uid="GrapeCity.Spreadsheet.UI.UIManager.Execute*"></a>
<h4 id="GrapeCity_Spreadsheet_UI_UIManager_Execute__1_System_Func_GrapeCity_Spreadsheet_IWorkbook_System_Object___0__GrapeCity_Spreadsheet_IWorkbook_System_Object_" data-uid="GrapeCity.Spreadsheet.UI.UIManager.Execute``1(System.Func{GrapeCity.Spreadsheet.IWorkbook,System.Object,``0},GrapeCity.Spreadsheet.IWorkbook,System.Object)">Execute&lt;T&gt;(Func&lt;IWorkbook, object, T&gt;, IWorkbook, object)</h4>
<div class="markdown level1 summary"><p>Execute an action and notify the change after action is invoked.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public T Execute&lt;T&gt;(Func&lt;IWorkbook, object, T&gt; action, IWorkbook workbook, object param)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Execute(Of T)(action As Func(Of IWorkbook, Object, T), workbook As IWorkbook, param As Object) As T</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="https://learn.microsoft.com/dotnet/api/system.func-3">Func</a>&lt;<a class="xref" href="GrapeCity.Spreadsheet.IWorkbook.html">IWorkbook</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>, T&gt;</td>
      <td><span class="parametername">action</span></td>
      <td><p>The action will be invoked.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.IWorkbook.html">IWorkbook</a></td>
      <td><span class="parametername">workbook</span></td>
      <td><p>The workbook, which is first parameter of action.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">param</span></td>
      <td><p>The second parameter to invoke action.</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><span class="xref">T</span></td>
      <td><p>Return the result after action is executed.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="parametername">T</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
