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


The client-side FolderChange event is raised when the selected folder in the tree of RadFileExplorer is changed.

To handle this event, simply write a JavaScript function that can be called when the event occurs. Then assign the name of this function as the value of the OnClientFolderChange property of the control.

The client-side OnClientFolderChange event handler receives two arguments:

  1. Sender: The RadFileExplorer object that fired the event.

  2. Event arguments: An event arguments object of type Telerik.Web.UI.FileExplorerEventArgs that exposes the following methods:

    Table 1: OnClientFolderChange Event Arguments Object

    Name Parameters Return Type Description
    get_cancel() Boolean Returns a value that indicates whether the event is cancelled.
    get_item() Object Returns the folder that is about to be opened.
    get_path() Returns the path to the folder that is about to be opened.
    set_cancel(value) Boolean Sets whether the event will be cancelled (if true is passed).

Example 1: Detect the folder change in the RadFileExplorer's client-side OnClientFolderChange event handler.

<telerik:RadFileExplorer ID="RadFileExplorer1" runat="server"  OnClientFolderChange="onClientFolderChange">
    <Configuration ViewPaths="~/Images" DeletePaths="~/Images" UploadPaths="~/Images" />
    function onClientFolderChange(fileExplorer, args) {
        // Get the selected folder path    
        alert(" Selected folder path : " + args.get_path());

See Also

In this article