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


The OnClientDropDownClosing client-side event occurs before the drop-down container is closed.

The event handler receives two parameters:

  1. The instance of RadAutoCompleteBox firing the event.

  2. An eventArgs parameter containing the following two methods:

  • get_cancel() - returns a boolean value indicating whether the event has been canceled.

  • set_cancel(boolean) - cancels the event depending on the value passed as an argument.

This event is used in scenarios when operations need to be performed to RadAutoCompleteBox before closing the drop-down container, or when the closing need to be canceled.

<script type="text/javascript">
    function dropDownClosing(sender, eventArgs) {
<telerik:RadAutoCompleteBox RenderMode="Lightweight" runat="server" ID="RadAutoCompleteBox1" OnClientDropDownClosing="dropDownClosing"
    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