Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 1.14 KB

onclientfilesselected.md

File metadata and controls

38 lines (26 loc) · 1.14 KB
title page_title description slug tags published position
OnClientFilesSelected
OnClientFilesSelected - RadAsyncUpload
Check our Web Forms article about OnClientFilesSelected.
asyncupload/client-side-programming/onclientfilesselected
onclientfilesselected
true
6

OnClientFilesSelected

The OnClientFilesSelected client-side event occurs when files(s) are selected. This event can be cancelled, which will erase the selectedfiles collection.

The event handler receives two parameters:

  1. The instance of the RadAsyncUpload control firing the event.

  2. An eventArgs parameter containing the following methods:

  • get_count returns the count of the selected files.

  • set_cancel lets you cancel the event and prevent items from being uploaded

<telerik:RadAsyncUpload RenderMode="Lightweight" runat="server" ID="RadAsyncUpload1" OnClientFilesSelected="OnClientFilesSelected" MultipleFileSelection="Automatic"></telerik:RadAsyncUpload>
function OnClientFilesSelected(sender, args) {
	var selectedFilesCount = args.get_count();
	alert(selectedFilesCount);
}