# C1.Win.Data.Entities.C1DataSource.SetControlHandler

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_Data_Entities_C1DataSource_SetControlHandler_" data-uid="C1.Win.Data.Entities.C1DataSource.SetControlHandler*">SetControlHandler Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_Data_Entities_C1DataSource_SetControlHandler_" data-uid="C1.Win.Data.Entities.C1DataSource.SetControlHandler*"></a>
<h4 id="C1_Win_Data_Entities_C1DataSource_SetControlHandler_System_Windows_Forms_Control_C1_Win_Data_ControlHandler_" data-uid="C1.Win.Data.Entities.C1DataSource.SetControlHandler(System.Windows.Forms.Control,C1.Win.Data.ControlHandler)">SetControlHandler(Control, ControlHandler)</h4>
<div class="markdown level1 summary"><p>Connects a <code class="paramref">controlHandler</code> to a given <code class="paramref">control</code>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SetControlHandler(Control control, ControlHandler controlHandler)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetControlHandler(control As Control, controlHandler As ControlHandler)</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.windows.forms.control">Control</a></td>
      <td><span class="parametername">control</span></td>
      <td><p>The control to be handled by the specified <code class="paramref">controlHandler</code>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.Data.ControlHandler.html">ControlHandler</a></td>
      <td><span class="parametername">controlHandler</span></td>
      <td><p>The control handler to handle the specified <code class="paramref">control</code>,
or null to disconnect the <code class="paramref">control</code> from the previously connected <a class="xref" href="C1.Win.Data.ControlHandler.html">control handler</a>.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
