Edit this page

OnClientFileSelected

The OnClientFileSelected client-side event occurs when a file is selected in a file input control.

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_fileInputField returns the file input field for the file that was just selected. (only when IFrame modules is used)

  • get_row returns the row containing the file input field for the file that was just selected (<li> element)

  • get_rowIndex returns the index of the row

  • get_fileName returns the name of the file selected

<telerik:RadAsyncUpload RenderMode="Lightweight" runat="server" ID="RadAsyncUpload1" OnClientFileSelected="OnClientFileSelected"></telerik:RadAsyncUpload>
function OnClientFileSelected(sender, args) {
    var currentFileName = args.get_fileName();
    alert(currentFileName);
}