Cancel RadUploadItem Deletion

The RadUpload allows you to cancel the deletion of a RadUploadItem.

In order to take advantage of this feature you will need to handle the RadUploadItem PreviewDelete event.

Add handler for the RadUploadItem PreviewDelete

Example 1: Subscribing to the PreviewDelete event

radUpload.AddHandler(RadUploadItem.PreviewDeleteEvent, new DeleteEventHandler(PreviewDelete)); 
radUpload.AddHandler(RadUploadItem.PreviewDeleteEvent, New DeleteEventHandler(AddressOf PreviewDelete)) 

In order to use the Telerik AddHandler overload to attach an event handler for the RadUploadItem.Delete and RadUploadItem.PreviewDelete events, you need to add the following using statement in your file: using Telerik.Windows;

Handle the PreviewDelete event

Example 2: Handling the PreviewDelete event

void PreviewDelete(object sender, DeleteEventArgs e) 
{ 
 e.Handled = true; 
} 
Private Sub PreviewDelete(ByVal sender As Object, ByVal e As DeleteEventArgs) 
 e.Handled = True 
End Sub 
In this article