FuzzySort
Namespace: Wisej.Ext.FuzzySort
Assembly: Wisej.Ext.FuzzySort (4.1.0.0)
Provides extension methods that add fuzzy search to Wisej.NET controls.
- C#
- VB.NET
public static class FuzzySort
Public Class FuzzySort
Methods
ApplyFuzzySort(control)
Enables fuzzy matching on the specified ComboBox.
Returns: ComboBox. The same control instance, allowing calls to be chained.
This method sets AutoCompleteMode to Filter, pushes the change to the client, and then starts the client-side fuzzy search on the control. As the user types, the drop-down items are filtered and matched with the fuzzysort library, and the matching characters in each item are highlighted.
Call this method after the control has been created. Setting AutoCompleteMode to a different value afterwards turns off the filtering behavior.
Example:
The following example fills a ComboBox with items and enables fuzzy search on it:
using Wisej.Web;
using Wisej.Ext.FuzzySort;
var comboBox = new ComboBox();
comboBox.Items.AddRange(new object[] { "Apple", "Apricot", "Banana", "Blueberry", "Cherry" });
comboBox.ApplyFuzzySort();
this.Controls.Add(comboBox);