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

Deleted

The Deleted server event fires if the Deleting event is not cancelled in one of the following cases:

  • During transfer - when the AutoPostBackOnTransfer="True" and the user tries to transfer an item / items. It fires after the Transferring server event (if not cancelled) once for all selected items. If this event is not cancelled and the AllowAutomaticUpdates="True" - the database is updated to reflect the new list.

  • On item delete - when the AutoPostBackOnDelete="True"

The event handler receives two parameters:

  1. The instance of the listbox firing the event

  2. An event arguments parameter containing the following property:

  • Items - collection of all RadListBoxItem objects which will be affected by the transfer / deletion.
protected void RadListBox1_Deleted(object sender, RadListBoxEventArgs e)
{
    Label.Text = "Deleted items are : ";
    foreach (RadListBoxItem item in e.Items)
    {
        Label.Text += item.Text + ",";
    }
}
Protected Sub RadListBox1_Deleted(sender As Object, e As RadListBoxEventArgs)
    Label.Text = "Deleted items are : "
    For Each item As RadListBoxItem In e.Items
        Label.Text += item.Text + ","
    Next
End Sub

See Also

In this article