Edit this page

OnClientLoad

The client-side Load event is raised when RadFileExplorer is initialized.

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 OnClientLoad property of the control.

The client-side OnClientLoad event handler receives one argument:

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

Example 1: Handle the RadFileExplorer's client-side Load event.

<telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" OnClientLoad="onClientLoad">
    <Configuration ViewPaths="~/Images" DeletePaths="~/Images" UploadPaths="~/Images"/>
</telerik:RadFileExplorer>
<script>
    function onClientLoad(fileExplorer) {
        var selectedItem = fileExplorer.get_selectedItem();
        var name = selectedItem.get_name();
        var type = selectedItem.get_type() == "1" ? "folder" : "file";
        alert("The currently selected item is a " + type + " with name " + name );
    }
</script>

See Also