Edit this page

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

[C#] Example 1: Subscribing to the PreviewDelete event

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

[VB.NET] Example 1: Subscribing to the PreviewDelete event

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

[C#] Example 2: Handling the PreviewDelete event

void PreviewDelete(object sender, DeleteEventArgs e)
{
 e.Handled = true;
}

[VB.NET] Example 2: Handling the PreviewDelete event

Private Sub PreviewDelete(ByVal sender As Object, ByVal e As DeleteEventArgs)
 e.Handled = True
End Sub