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

Events

RadComboBox supports a number of client-side events that let you customize its behavior:

To use these events, simply write a JavaScript function that can be called when the event occurs. Then assign the name of the JavaScript function as the value of the the corresponding RadComboBox property.

ASPNET
<script language="javascript" type="text/javascript">
	function MyClientBlur(sender, eventArgs) {
		alert("blur");
	}
</script>

<telerik:radcombobox 
	id="RadComboBox1" 
	runat="server" 
	onclientblur="MyClientBlur">
</telerik:radcombobox>

You can also assign event handlers in client-side code:

JavaScript
	
function MyClientBlur(sender, eventArgs) {
	alert("blur");
}

function pageLoad() {
	var combo = $find("<%= RadComboBox1.ClientID %>");
	combo.add_onClientBlur(MyClientBlur);
}
	

Another advantage of the client-side API is that you can detach an event handler dynamically:

JavaScript
	
function RemoveEventHandler() {
	var combo = $find("<%= RadComboBox1.ClientID %>");
	combo.remove_onClientBlur(MyClientBlur); 
}
	

Note that on the client-side, the names of events are slightly different than on the server side. The following table shows the correspondance between client-side and server-side names:

Client-SideNameServer-Side NameMethods to Add and Remove
OnClientLoadloadadd_load, remove_load.
OnClientKeyPressingkeyPressingadd_keyPressing, remove_keyPressing.
OnClientSelectedIndexChangingselectedIndexChangingadd_selectedIndexChanging, remove_selectedIndexChanging.
OnClientSelectedIndexChangedselectedIndexChangedadd_selectedIndexChanged, remove_selectedIndexChanged.
OnClientItemsRequestingitemsRequestingadd_itemsRequesting, remove_itemsRequesting.
OnClientItemsRequesteditemsRequestedadd_itemsRequested, remove_itemsRequested.
OnClientDropDownOpeningdropDownOpeningadd_dropDownOpening, remove_dropDownOpening.
OnClientDropDownOpeneddropDownOpenedadd_dropDownOpened, remove_dropDownOpened.
OnClientDropDownClosingdropDownClosingadd_dropDownClosing, remove_dropDownClosing.
OnClientDropDownCloseddropDownClosedadd_dropDownClosed, remove_dropDownClosed.
OnClientItemsRequestFaileditemsRequestFailedadd_itemsRequestFailed, remove_itemsRequestFailed.
OnClientFocusonClientFocusadd_onClientFocus, remove_onClientFocus.
OnClientBluronClientBluradd_onClientBlur, remove_onClientBlur.
OnClientTextChangetextChangeadd_textChange, remove_textChange.
OnClientItemDataBounditemDataBoundadd_itemDataBound, remove_itemDataBound.

See Also

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