Various Filter Options for Suggestion

17 Jan 20252 minutes to read

By default, the items that matches with the starting letter will be displayed as suggestion. This phenomenon can be changed using SuggestionMode property, which provides various option to filter the data according to the text entered. There are eight types of suggestion modes and are described as follows.

Words that Starts with Input Text

Displays the list of suggestions based on starting letter.

countryAutoComplete.SuggestionMode = SuggestionMode.StartsWith;

Filter with Character Casing

Displays the list of suggestions based on starting letter with case sensitive.

countryAutoComplete.SuggestionMode = SuggestionMode.StartsWithCaseSensitive;

Words that Contains the Input Text

Displays the list of suggestions, if autocomplete list contains that words.

countryAutoComplete.SuggestionMode = SuggestionMode.Contains;

Filter with Character Casing

Displays the list of suggestions, if autocomplete list contains that words with case sensitive.

countryAutoComplete.SuggestionMode = SuggestionMode.ContainsWithCaseSensitive;

Words that Equals to the Input Text

Displays the word that matches.

countryAutoComplete.SuggestionMode = SuggestionMode.Equals;

Filter with Character Casing

Displays the word that matches with case sensitive.

countryAutoComplete.SuggestionMode = SuggestionMode.EqualsWithCaseSensitive;

Words that Ends with Input Text

Displays the list of suggestions based on ending word.

countryAutoComplete.SuggestionMode = SuggestionMode.EndsWith;

Filter with Character Casing

Displays the list of suggestions based on the ending word with case sensitive.

countryAutoComplete.SuggestionMode = SuggestionMode.EndsWithCaseSensitive;

Custom filter

Displays the list of suggestions based on the custom words in the SfAutoComplete.

countryAutoComplete.SuggestionMode = SuggestionMode.Custom;