Access action Button

2 posts, 0 answers
  1. Katyusca
    Katyusca avatar
    5 posts
    Member since:
    Apr 2009

    Posted 24 Aug 2009 Link to this post

    I want throw in any moment the event of button in fileexplorer, and not only pressing the button

    How  can i do that'??

  2. Fiko
    Fiko avatar
    1406 posts

    Posted 27 Aug 2009 Link to this post

    Hi Katyusca,

    This can be achieved by getting the reference to the RadToolBar and then use its client-side API. The code bellow shows the steps to run the Upload command from JavaScript. The commented parts also work and you could use the same approach for the other commands in the Explorer.

    <script type="text/javascript"
        function runCommand() 
            var oExplorer = $find("<%= RadFileExplorer1.ClientID %>"); 
            var oToolbar = oExplorer.get_toolbar(); // Get the toolbar 
            // Upload button ; 
            var oUpButton = oToolbar.findItemByValue("Upload"); 
            // delete command ; 
            // var oDelButton = oToolbar.findItemByValue("Delete"); 
            // Refresh command ; 
            // var oRefreshButton = oToolbar.findItemByValue("Refresh"); 
            // Instead you could use the oExplorer.refresh(); as well ; 
    I hope this helps.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top