Invoke FileExplorer commands from custom button

2 posts, 1 answers
  1. Andreas
    Andreas avatar
    12 posts
    Member since:
    Aug 2010

    Posted 26 Nov 2010 Link to this post


    I'm building my own custom "toolbar" (it's not a RadToolBar) on a page containing a FileExplorer, amongst other things. From that custom toolbar, I'd like to invoke some of the built in commands in FileExplorer.

    So, as an example, when clicking my own custom "New Folder" button, it does the exact same thing as the New Folder toolbar button does in FileExplorer: Opens up the FileExplorers _own_ 'New Folder' dialog.

    I would like to be able to do this for 'New Folder', 'Delete', 'Upload', and the rest of the built in commands in FileExplorer.

    It it doable?

    Thank you,
    Best regards,

  2. Answer
    Fiko avatar
    1406 posts

    Posted 01 Dec 2010 Link to this post

    Hello Andreas,

    You can use these commands in order to implement your scenario:
    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
        <script type="text/javascript">
            function openUpload()
                var oExplorer = $find("<%= RadFileExplorer1.ClientID %>");
                var uploadItem = oExplorer.get_gridContextMenu().findItemByValue("Upload"); // use the contextmenu's Upload command
            function callDelete()
                var oExplorer = $find("<%= RadFileExplorer1.ClientID %>");
                var uploadItem = oExplorer.deleteSelectedItems(); //
            function openCreateNewDirectory()
                var oExplorer = $find("<%= RadFileExplorer1.ClientID %>");
                oExplorer.createNewDirectory(); //

    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top