# C1.Web.Mvc.AutoCompleteBase-1.CustomFilter

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Web_Mvc_AutoCompleteBase_1_CustomFilter_" data-uid="C1.Web.Mvc.AutoCompleteBase`1.CustomFilter*">CustomFilter Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Web_Mvc_AutoCompleteBase_1_CustomFilter_" data-uid="C1.Web.Mvc.AutoCompleteBase`1.CustomFilter*"></a>
<h4 id="C1_Web_Mvc_AutoCompleteBase_1_CustomFilter" data-uid="C1.Web.Mvc.AutoCompleteBase`1.CustomFilter">CustomFilter</h4>
<div class="markdown level1 summary"><p>Gets or sets a custom filter function for filtering items.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[JsonConverter(typeof(FunctionConverter))]
public virtual string CustomFilter { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;JsonConverter(GetType(FunctionConverter))&gt;
Public Overridable Property CustomFilter As String</code></pre>
</div>
<h5 id="C1_Web_Mvc_AutoCompleteBase_1_CustomFilter_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The function takes three parameters: the data item to test, the current query text, and the display text after <code>DisplayMemberPath</code> processing. It returns <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> to include the item and <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a> to exclude it. When set, CaseSensitiveSearch, <a class="xref" href="C1.Web.Mvc.AutoCompleteBase-1.BeginsWithSearch.html#C1_Web_Mvc_AutoCompleteBase_1_BeginsWithSearch">BeginsWithSearch</a> and <a class="xref" href="C1.Web.Mvc.AutoCompleteBase-1.IsContentHtml.html#C1_Web_Mvc_AutoCompleteBase_1_IsContentHtml">IsContentHtml</a> are ignored, while <a class="xref" href="C1.Web.Mvc.AutoCompleteBase-1.MinLength.html#C1_Web_Mvc_AutoCompleteBase_1_MinLength">MinLength</a> and <a class="xref" href="C1.Web.Mvc.AutoCompleteBase-1.MaxItems.html#C1_Web_Mvc_AutoCompleteBase_1_MaxItems">MaxItems</a> still apply. This property has no effect when <a class="xref" href="C1.Web.Mvc.AutoCompleteBase-1.ItemsSourceFunction.html#C1_Web_Mvc_AutoCompleteBase_1_ItemsSourceFunction">ItemsSourceFunction</a> is set. The default value is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p>
</div>
</div>
