New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

AutoCompleteBoxEntryCollection Object

The AutoCompleteBoxEntryCollection object is returned by the get_items method of the RadAutoCompleteBox object. The following table lists the most important methods:

NameParametersReturn TypeDescription
get_count()noneNumberReturns the number of the entries present in the Entry collection.
add()Telerik.Web.UI.AutoCompleteBoxEntrynoneAdds the specified entry into the Entry collection. See Example 1.
insert()number,Telerik.Web.UI.AutoCompleteBoxEntrynoneInserts an entry in the Entry collection with the specified index.
remove()Telerik.Web.UI.AutoCompleteBoxEntrynoneRemoves the specified entry from the Entry collection.
clear()nonenoneClears all the entries from the Entry collection.
getEntry()numberTelerik.Web.UI.AutoCompleteBoxEntryReturns the entry with the specified index.
indexOf()Telerik.Web.UI.AutoCompleteBoxEntrynumberReturns the index of the specified entry.

Example 1: Create new entry, add it to the RadAutoCompleteBox entries collection and set the color of the new entry token DOM element to 'red':

JavaScript
	
	function changeTokenElementColor() {
		var autoComplete = $find("<%= RadAutoCompleteBox1.ClientID %>");
		var newEntry = autoComplete.createEntry('Text', 'Value');
		var entries = autoComplete.get_entries();
		entries.add(newEntry);
		var tokenDomElement = newEntry.get_token();
		tokenDomElement.style.color = "red";
    }
	

See Also

In this article
See Also
Not finding the help you need?
Contact Support