# GrapeCity.ActiveReports.Design.Designer.ExecuteAction

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_ActiveReports_Design_Designer_ExecuteAction_" data-uid="GrapeCity.ActiveReports.Design.Designer.ExecuteAction*">ExecuteAction Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_Design_Designer_ExecuteAction_" data-uid="GrapeCity.ActiveReports.Design.Designer.ExecuteAction*"></a>
<h4 id="GrapeCity_ActiveReports_Design_Designer_ExecuteAction_GrapeCity_ActiveReports_Design_DesignerAction_" data-uid="GrapeCity.ActiveReports.Design.Designer.ExecuteAction(GrapeCity.ActiveReports.Design.DesignerAction)">ExecuteAction(DesignerAction)</h4>
<div class="markdown level1 summary"><p>Executes the specified <a class="xref" href="GrapeCity.ActiveReports.Design.DesignerAction.html">DesignerAction</a> command within the designer environment.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ExecuteAction(DesignerAction action)</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.ActiveReports.Design.DesignerAction.html">DesignerAction</a></td>
      <td><span class="parametername">action</span></td>
      <td><p>The <a class="xref" href="GrapeCity.ActiveReports.Design.DesignerAction.html">DesignerAction</a> to be executed. This action corresponds to various design-time operations such as adding new controls,
deleting controls, or changing properties.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_Design_Designer_ExecuteAction_GrapeCity_ActiveReports_Design_DesignerAction__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method facilitates the execution of design-time actions, typically triggered by user interaction with custom toolbars or menus in the designer interface.
It allows for the extension of the designer's functionality by enabling the execution of predefined actions programmatically.</p>
</div>
<h5 id="GrapeCity_ActiveReports_Design_Designer_ExecuteAction_GrapeCity_ActiveReports_Design_DesignerAction__examples">Examples</h5>
<pre><code class="lang-csharp">// The following example demonstrates how to remove selected items from the designer surface by executing the EditDelete action:
private void RemoveSelectedItems()
{
	designer.ExecuteAction(DesignerAction.EditDelete);
}
// You can also clear the designer surface by selecting all items and deleting them
private void Clear()
{
	designer.ExecuteAction(DesignerAction.SelectAll);
	designer.ExecuteAction(DesignerAction.EditDelete);
}</code></pre>



<a id="GrapeCity_ActiveReports_Design_Designer_ExecuteAction_" data-uid="GrapeCity.ActiveReports.Design.Designer.ExecuteAction*"></a>
<h4 id="GrapeCity_ActiveReports_Design_Designer_ExecuteAction_GrapeCity_ActiveReports_Design_DesignerAction_System_Object_" data-uid="GrapeCity.ActiveReports.Design.Designer.ExecuteAction(GrapeCity.ActiveReports.Design.DesignerAction,System.Object)">ExecuteAction(DesignerAction, object)</h4>
<div class="markdown level1 summary"><p>Executes the specified DesignerAction command with an optional parameter.
This method can be utilized when implementing custom toolbars or menus within the designer environment. It enables the execution of report actions in
response to user interactions with toolbar or menu items.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ExecuteAction(DesignerAction action, object parameter)</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.ActiveReports.Design.DesignerAction.html">DesignerAction</a></td>
      <td><span class="parametername">action</span></td>
      <td><p>The <a class="xref" href="GrapeCity.ActiveReports.Design.DesignerAction.html">DesignerAction</a> to execute. This parameter specifies the action to be performed by the designer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">parameter</span></td>
      <td><p>A parameter that can be passed to the action. This can be used to provide additional context or data
required for the action's execution.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_Design_Designer_ExecuteAction_GrapeCity_ActiveReports_Design_DesignerAction_System_Object__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The method supports a wide range of design-time actions, including but not limited to adding or removing controls, modifying properties, and triggering
custom logic defined in extensions or plugins.</p>
</div>
</div>
