Telerik ASP.NET RadAutoCompleteBox Entries Collection

The Telerik RadAutoCompleteBox uses an Entries collection to represent the items a user has selected. Understanding how Entries works is essential when binding data, loading saved values, or reacting to user selections during postbacks or AJAX requests.
 
Personally, I've only ever used it in 'single' entry mode, but it is pretty versatile and allows a lot more than that.
 
If you're not familiar with the RadAutoCompleteBox, go to the menu and read that article first. 
 

Related Articles

... and you 'll find more on the Telerik ASPNET Menu

This is what I normally do:

Dim oEntries As AutoCompleteBoxEntryCollection = Me.ddlItemNumber2.Entries
If oEntries.Count > 0 Then
    'be sure there is at least on entry in the autocompletebox
    Session("itemnmbr") = Me.ddlItemNumber2.Entries(0).Text
 
    Response.Redirect("somepage.aspx")
 
End If

What the Entries Collection Represents

The Entries collection contains the items the user has selected in the AutoCompleteBox. It does not represent the suggestion list or the data source. Each entry corresponds to a user-selected token or text item inside the control.

The AutoCompleteBoxEntry Object

Each entry in the collection is an AutoCompleteBoxEntry object. It exposes the following properties:

  • Text – the visible text
  • Value – the underlying value
  • Attributes – optional custom fields
  • IsCustom – true when the user typed a value not found in the data source

Reading Entries in Server-Side Code

You can iterate through the Entries collection during a postback or AJAX postback:

For Each entry As AutoCompleteBoxEntry In RadAutoCompleteBox1.Entries
    Dim txt As String = entry.Text
    Dim val As String = entry.Value
Next

Adding Entries Programmatically

Entries can be added manually when loading an existing record:

Dim e As New AutoCompleteBoxEntry("Florida", "FL")
RadAutoCompleteBox1.Entries.Add(e)

Clearing Entries

To reset the control:

RadAutoCompleteBox1.Entries.Clear()

When Entries Are Available

The Entries collection is populated only after a postback or AJAX postback. It is empty on the initial page load. RadAjaxPanel requests behave like normal postbacks, so Entries is always available inside those events.

Reacting to User Selections

You can respond to selections on the client or server:

Client-side:

function OnEntryAdded(sender, args) {
    var entry = args.get_entry();
    console.log(entry.get_text());
}


RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences