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

Events Overview

RadListBox supports a number of client-side events that let you customize the behavior of the listbox:

To subscribe to a client event just set the appropriate property to the name of the javascript function that will handle the event. The function always receives two parameters - a sender (RadListBox firing the event) and event arguments having different methods.

<telerik:radlistbox id="RadListBox1" allowdelete="true" onclientdeleted="onClientDeletedHandler" runat="server"></telerik:radlistbox>
function onClientDeletedHandler(sender, e) {
    alert("Successfully deleted: " + e.get_item().get_text());

There is a shorter way to handle a client-side event:

<telerik:radlistbox id="RadListBox2" allowdelete="true" onclientdeleted="(function(sender, e){ alert('Successfully deleted: ' + e.get_item().get_text()); })" runat="server">

Similarly, you can set the property in code behind:

RadListBox1.OnClientDeleted = "onClientDeletedHandler"; 
RadListBox1.OnClientDeleted = "onClientDeletedHandler"

See Also

In this article