Maximum number of items allowed.

Hi
I have a couple questions.
How can I set the maximum number of items allowed in a textbox with autocomplete?
How can I set not duplicate values in a textbox with autocomplete?

Thanks in advance.

1 Reply

AP Arun Palaniyandi Syncfusion Team January 30, 2018 12:44 PM UTC

Hi Jaime, 
 
Thanks for contacting Syncfusion support. 
 
Query1:” How can I set the maximum number of items allowed in a textbox with autocomplete?”. 
 
There is no way to limit the number of items allowed to the Autocomplete Textbox. By default, it will allow one value to be selected in it and if we want to allow more than one value(i.e multi values), we can enable it using the multiSelectMode property. But Autocomplete has some other properties for searching and suggestionlist display limitations. 
 
1.     using the minCharacter property we can limit the text search in our Autocomplete. By default, the minimum character is 1 and we can set our desired maximum values. 
 
 
2.     Using itemsCount property, we can limit the number of items to be displayed in the suggestion list. 
 
 
 
 
Query2:” How can I set not duplicate values in a textbox with autocomplete? 
 
To not set the duplicate values in Autocomplete, we suggest you use the multiSelectMode property as visualmode. Hence by setting this property, the already selected item will not be repeated in the autocomplete suggestion. 
 
 
We also suggest you use the enableDistinct property. Hence this property is used to disable displaying the duplicate values present in the suggestion list. 
 
 
 
 
 
Please check the provided information and let us know if you need any further assistance.   
   
   
Regards,
Arun P.   
 


Loader.
Up arrow icon