Customizing the Suggestion DropDown

28 Jun 2019 / 2 minutes to read

The suggestion list displaying behavior can be customized based on the entered text and delays in displaying the items.

Set Minimum Prefix Character

Instead of displaying suggestion list on every text entry, the most possible match can be filtered and displayed after few text entries. This can be done by modifying MinimumPrefixCharacters.


The default property value is 1.


Minimum prefix character

Set Popup Delay

We can delay the time taken to display the dropdown with suggestion list by using the PopUpDelay property in SfAutoComplete .


The default value is 0. The property value is maintained in milliseconds.

countryAutoComplete.PopUpDelay = 100;

Set Maximum Height to the DropDown

The height of the drop-down portion of the SfAutocomplete control can be varied using MaximumDropDownHeight property.


The MaximumDropDownHeight value can be any positive integer value

countryAutoComplete.MaxDropDownHeight = 90;

Maximum drop down height

Set border color to the DropDown

The DropDownBorderColor property is used to change the border color of DropDown. The following code example demonstrates how to change the border color of DropDown.

SfAutoComplete countryAutoComplete = new SfAutoComplete();
            countryAutoComplete.Frame = new CGRect(10, 20, 250, 30);
            NSMutableArray countryList = new NSMutableArray();
            countryAutoComplete.AutoCompleteSource = countryList;
            countryAutoComplete.DropDownBorderColor = UIColor.Red;
            countryAutoComplete.ShowSuggestionsOnFocus = true;

Drop down border color