# C1.Win.Data.ControlHandler

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Win_Data_ControlHandler" data-uid="C1.Win.Data.ControlHandler" class="text-break">ControlHandler Class
</h1>
  <div class="markdown level0 summary"><p>Represents a control handler that connect GUI controls of supported types to a C1DataSource so
that those controls can be given additional functionality such as
<a class="xref" href="../C1.Data.Entity.4.8/C1.Data.DataSource.BaseControlHandler.AutoLookup.html#C1_Data_DataSource_BaseControlHandler_AutoLookup">lookup columns</a> and <a class="xref" href="../C1.Data.Entity.4.8/C1.Data.DataSource.BaseControlHandler.VirtualMode.html#C1_Data_DataSource_BaseControlHandler_VirtualMode">virtual mode</a>.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.threading.dispatcherobject">DispatcherObject</a></div>
    <div class="level2"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.dependencyobject">DependencyObject</a></div>
    <div class="level3"><a class="xref" href="../C1.Data.Entity.4.8/C1.Data.DataSource.BaseControlHandler.html">BaseControlHandler</a></div>
    <div class="level4"><span class="xref">ControlHandler</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.isupportinitialize">ISupportInitialize</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.icustomtypedescriptor">ICustomTypeDescriptor</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Win.Data.html">C1.Win.Data</a></h6>
  <h6><strong>Assembly</strong>: C1.Win.Data.Entity.4.8.dll</h6>
  <h5 id="C1_Win_Data_ControlHandler_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[TypeConverter(typeof(ExpandableObjectConverter))]
public class ControlHandler : BaseControlHandler, IDisposable, ISupportInitialize, ICustomTypeDescriptor</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;TypeConverter(GetType(ExpandableObjectConverter))&gt;
Public Class ControlHandler
    Inherits BaseControlHandler
    Implements IDisposable, ISupportInitialize, ICustomTypeDescriptor</code></pre>
  </div>
  <h5 id="C1_Win_Data_ControlHandler_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>To connect a <a class="xref" href="C1.Win.Data.ControlHandler.html">control handler</a> to a control, put a <a class="xref" href="C1.Win.Data.Entities.C1DataSource.html">C1DataSource</a> on your form and
configure the ControlHandler extender property (that appears in your GUI controls when you add a <a class="xref" href="C1.Win.Data.Entities.C1DataSource.html">C1DataSource</a> to the form).
Alternatively, use the <a class="xref" href="C1.Win.Data.Entities.C1DataSource.SetControlHandler.html#C1_Win_Data_Entities_C1DataSource_SetControlHandler_System_Windows_Forms_Control_C1_Win_Data_ControlHandler_">SetControlHandler(Control, ControlHandler)</a> method in code.</p>
<p>The supported GUI controls are: <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.datagridview">DataGridView</a> and C1.Win.C1FlexGrid.C1FlexGrid.</p>
</div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Win_Data_ControlHandler__ctor" data-uid="C1.Win.Data.ControlHandler.#ctor">
          <a class="xref" href="C1.Win.Data.ControlHandler.-ctor.html#C1_Win_Data_ControlHandler__ctor">ControlHandler()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Win_Data_ControlHandler_EnableVirtualMode" data-uid="C1.Win.Data.ControlHandler.EnableVirtualMode">
          <a class="xref" href="C1.Win.Data.ControlHandler.EnableVirtualMode.html#C1_Win_Data_ControlHandler_EnableVirtualMode">EnableVirtualMode()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_Win_Data_ControlHandler_GetDataSource" data-uid="C1.Win.Data.ControlHandler.GetDataSource">
          <a class="xref" href="C1.Win.Data.ControlHandler.GetDataSource.html#C1_Win_Data_ControlHandler_GetDataSource">GetDataSource()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
    </tbody>
  </table>

</div>
