New to Telerik UI for ASP.NET AJAX? Download free 30-day trial


The OnClientRequested client-side event occurs right after the requested items are loaded into the drop-down container.

The event handler receives two parameters:

  1. The instance of RadAutoCompleteBox firing the event.

  2. An eventArgs parameter containing the following method:

  • get_text() - returns the text currently present in the input area.

  • get_data() - returns an array of the entries in the dropdown.

    • length - returns the number of the elements in the dropdown.

This event is used in scenarios when operations need to be preformed to RadAutoCompleteBox right after the data source items are loaded into the drop-down container.

<script type="text/javascript">
    function requested(sender, args) {
<telerik:RadAutoCompleteBox RenderMode="Lightweight" runat="server" ID="RadAutoComplete1" OnClientRequested="requested"
    DataSourceID="SqlDataSource1" DataTextField="Name" DataValueField="ID">
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TelerikVSXConnectionString %>"
    SelectCommand="SELECT [ID], [CountryID], [Name] FROM [Cities]"></asp:SqlDataSource>

See Also

In this article