# C1.Win.FlexGrid.C1FlexGridBase.ApplySearch

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_FlexGrid_C1FlexGridBase_ApplySearch_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.ApplySearch*">ApplySearch Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_FlexGrid_C1FlexGridBase_ApplySearch_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.ApplySearch*"></a>
<h4 id="C1_Win_FlexGrid_C1FlexGridBase_ApplySearch_System_String_System_Boolean_System_Boolean_System_Boolean_System_Boolean_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.ApplySearch(System.String,System.Boolean,System.Boolean,System.Boolean,System.Boolean)">ApplySearch(string, bool, bool, bool, bool)</h4>
<div class="markdown level1 summary"><p>Applies search to the data on the grid.
This method is obsolete. Call method with <a class="xref" href="C1.Win.FlexGrid.SearchHighlightMode.html">SearchHighlightMode</a> argument instead.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[Obsolete(&quot;Call method with HighlightMode argument instead.&quot;)]
public void ApplySearch(string search, bool highlight, bool filter, bool onlyVisibleColumns, bool onlyVisibleRows)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;Obsolete(&quot;Call method with HighlightMode argument instead.&quot;)&gt;
Public Sub ApplySearch(search As String, highlight As Boolean, filter As Boolean, onlyVisibleColumns As Boolean, onlyVisibleRows As Boolean)</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.string">string</a></td>
      <td><span class="parametername">search</span></td>
      <td><p>Words which will be searched.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">highlight</span></td>
      <td><p>Defines will search results be highlighted or not.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">filter</span></td>
      <td><p>Defines will search results be filtered or not.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">onlyVisibleColumns</span></td>
      <td><p>Defines will perform search through only visible columns or not.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">onlyVisibleRows</span></td>
      <td><p>Defines will perform search through only visible rows or not.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_FlexGrid_C1FlexGridBase_ApplySearch_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.ApplySearch*"></a>
<h4 id="C1_Win_FlexGrid_C1FlexGridBase_ApplySearch_System_String_C1_Win_FlexGrid_SearchHighlightMode_System_Boolean_System_Boolean_System_Boolean_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.ApplySearch(System.String,C1.Win.FlexGrid.SearchHighlightMode,System.Boolean,System.Boolean,System.Boolean)">ApplySearch(string, SearchHighlightMode, bool, bool, bool)</h4>
<div class="markdown level1 summary"><p>Applies search to the data on the grid.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ApplySearch(string search, SearchHighlightMode highlightMode, bool filter, bool onlyVisibleColumns, bool onlyVisibleRows)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub ApplySearch(search As String, highlightMode As SearchHighlightMode, filter As Boolean, onlyVisibleColumns As Boolean, onlyVisibleRows As Boolean)</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.string">string</a></td>
      <td><span class="parametername">search</span></td>
      <td><p>Words which will be searched.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.FlexGrid.SearchHighlightMode.html">SearchHighlightMode</a></td>
      <td><span class="parametername">highlightMode</span></td>
      <td><p>Defines how to search results be highlighted.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">filter</span></td>
      <td><p>Defines will search results be filtered or not.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">onlyVisibleColumns</span></td>
      <td><p>Defines will perform search through only visible columns or not.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">onlyVisibleRows</span></td>
      <td><p>Defines will perform search through only visible rows or not.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_FlexGrid_C1FlexGridBase_ApplySearch_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.ApplySearch*"></a>
<h4 id="C1_Win_FlexGrid_C1FlexGridBase_ApplySearch_System_String_C1_Win_FlexGrid_SearchHighlightMode_System_Boolean_System_Boolean_System_Boolean_System_Int32__" data-uid="C1.Win.FlexGrid.C1FlexGridBase.ApplySearch(System.String,C1.Win.FlexGrid.SearchHighlightMode,System.Boolean,System.Boolean,System.Boolean,System.Int32@)">ApplySearch(string, SearchHighlightMode, bool, bool, bool, out int)</h4>
<div class="markdown level1 summary"><p>Applies search to the data on the grid.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ApplySearch(string search, SearchHighlightMode highlightMode, bool filter, bool onlyVisibleColumns, bool onlyVisibleRows, out int matchesCount)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub ApplySearch(search As String, highlightMode As SearchHighlightMode, filter As Boolean, onlyVisibleColumns As Boolean, onlyVisibleRows As Boolean, ByRef matchesCount As Integer)</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.string">string</a></td>
      <td><span class="parametername">search</span></td>
      <td><p>Words which will be searched.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.FlexGrid.SearchHighlightMode.html">SearchHighlightMode</a></td>
      <td><span class="parametername">highlightMode</span></td>
      <td><p>Defines how to search results be highlighted.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">filter</span></td>
      <td><p>Defines will search results be filtered or not.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">onlyVisibleColumns</span></td>
      <td><p>Defines will perform search through only visible columns or not.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">onlyVisibleRows</span></td>
      <td><p>Defines will perform search through only visible rows or not.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">matchesCount</span></td>
      <td><p>Returns the number of matches.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_FlexGrid_C1FlexGridBase_ApplySearch_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.ApplySearch*"></a>
<h4 id="C1_Win_FlexGrid_C1FlexGridBase_ApplySearch_System_String_System_Boolean_System_Boolean_System_Boolean_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.ApplySearch(System.String,System.Boolean,System.Boolean,System.Boolean)">ApplySearch(string, bool, bool, bool)</h4>
<div class="markdown level1 summary"><p>Applies search to the data on the grid.
This method is obsolete. Call method with HighlightMode argument instead.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[Obsolete(&quot;Call method with HighlightMode argument instead.&quot;)]
public void ApplySearch(string search, bool highlight, bool filter, bool onlyVisibleColumns)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;Obsolete(&quot;Call method with HighlightMode argument instead.&quot;)&gt;
Public Sub ApplySearch(search As String, highlight As Boolean, filter As Boolean, onlyVisibleColumns As Boolean)</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.string">string</a></td>
      <td><span class="parametername">search</span></td>
      <td><p>Words which will be searched.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">highlight</span></td>
      <td><p>Defines will search results be highlighted or not.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">filter</span></td>
      <td><p>Defines will search results be filtered or not.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">onlyVisibleColumns</span></td>
      <td><p>Defines will perform search through only visible columns or not.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_FlexGrid_C1FlexGridBase_ApplySearch_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.ApplySearch*"></a>
<h4 id="C1_Win_FlexGrid_C1FlexGridBase_ApplySearch_System_String_C1_Win_FlexGrid_SearchHighlightMode_System_Boolean_System_Boolean_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.ApplySearch(System.String,C1.Win.FlexGrid.SearchHighlightMode,System.Boolean,System.Boolean)">ApplySearch(string, SearchHighlightMode, bool, bool)</h4>
<div class="markdown level1 summary"><p>Applies search to the data on the grid.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ApplySearch(string search, SearchHighlightMode highlightMode, bool filter, bool onlyVisibleColumns)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub ApplySearch(search As String, highlightMode As SearchHighlightMode, filter As Boolean, onlyVisibleColumns As Boolean)</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.string">string</a></td>
      <td><span class="parametername">search</span></td>
      <td><p>Words which will be searched.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.FlexGrid.SearchHighlightMode.html">SearchHighlightMode</a></td>
      <td><span class="parametername">highlightMode</span></td>
      <td><p>Defines how to search results be highlighted.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">filter</span></td>
      <td><p>Defines will search results be filtered or not.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">onlyVisibleColumns</span></td>
      <td><p>Defines will perform search through only visible columns or not.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_FlexGrid_C1FlexGridBase_ApplySearch_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.ApplySearch*"></a>
<h4 id="C1_Win_FlexGrid_C1FlexGridBase_ApplySearch_System_String_System_Boolean_System_Boolean_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.ApplySearch(System.String,System.Boolean,System.Boolean)">ApplySearch(string, bool, bool)</h4>
<div class="markdown level1 summary"><p>Applies search to the data on the grid.
This method is obsolete. Call method with HighlightMode argument instead.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[Obsolete(&quot;Call method with HighlightMode argument instead.&quot;)]
public void ApplySearch(string search, bool highlight, bool filter)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;Obsolete(&quot;Call method with HighlightMode argument instead.&quot;)&gt;
Public Sub ApplySearch(search As String, highlight As Boolean, filter As Boolean)</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.string">string</a></td>
      <td><span class="parametername">search</span></td>
      <td><p>Words which will be searched.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">highlight</span></td>
      <td><p>Defines will search results be highlighted or not.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">filter</span></td>
      <td><p>Defines will search results be filtered or not.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_FlexGrid_C1FlexGridBase_ApplySearch_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.ApplySearch*"></a>
<h4 id="C1_Win_FlexGrid_C1FlexGridBase_ApplySearch_System_String_C1_Win_FlexGrid_SearchHighlightMode_System_Boolean_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.ApplySearch(System.String,C1.Win.FlexGrid.SearchHighlightMode,System.Boolean)">ApplySearch(string, SearchHighlightMode, bool)</h4>
<div class="markdown level1 summary"><p>Applies search to the data on the grid.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ApplySearch(string search, SearchHighlightMode highlightMode, bool filter)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub ApplySearch(search As String, highlightMode As SearchHighlightMode, filter As Boolean)</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.string">string</a></td>
      <td><span class="parametername">search</span></td>
      <td><p>Words which will be searched.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.FlexGrid.SearchHighlightMode.html">SearchHighlightMode</a></td>
      <td><span class="parametername">highlightMode</span></td>
      <td><p>Defines how to search results be highlighted.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">filter</span></td>
      <td><p>Defines will search results be filtered or not.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_FlexGrid_C1FlexGridBase_ApplySearch_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.ApplySearch*"></a>
<h4 id="C1_Win_FlexGrid_C1FlexGridBase_ApplySearch_System_String_C1_Win_FlexGrid_SearchHighlightMode_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.ApplySearch(System.String,C1.Win.FlexGrid.SearchHighlightMode)">ApplySearch(string, SearchHighlightMode)</h4>
<div class="markdown level1 summary"><p>Applies search to the data on the grid.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ApplySearch(string search, SearchHighlightMode highlightMode = SearchHighlightMode.OnlyFirst)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub ApplySearch(search As String, Optional highlightMode As SearchHighlightMode = SearchHighlightMode.OnlyFirst)</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.string">string</a></td>
      <td><span class="parametername">search</span></td>
      <td><p>Words which will be searched.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.FlexGrid.SearchHighlightMode.html">SearchHighlightMode</a></td>
      <td><span class="parametername">highlightMode</span></td>
      <td><p>Defines how to search results be highlighted.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
