Overwrite Files Checkbox

3 posts, 1 answers
  1. Chris
    Chris avatar
    20 posts
    Member since:
    Jan 2009

    Posted 01 Jun 2009 Link to this post

    For the FileExplorer control, is it possible to hid the Overwrite Files checkbox in the upload window?
  2. Answer
    Fiko avatar
    1406 posts

    Posted 02 Jun 2009 Link to this post

    Hi Chris,

    There is no property for that behavior, but you can achieve the desired result by using the following client-side approach:
    • attach a handler to the OnClientLoad event of the RadFileExplorer event
    • get reference to the embedded RadWindowManager object
    • attach a handler to the OnClientshow event of the newly opened RadWindows, by using the client-side API of the RadWindowManager
    • implement a code into the OnClientShow handler in order to hide the checkbox from the upload window
    The complete code should looks like the follows :

    <script type="text/javascript"
        var oFileExplorer; 
        function OnExplorerLoad(oExplorer, args) 
            oFileExplorer = oExplorer; 
            var oWinManager = oExplorer.get_windowManager(); // get the window manager 
            oWinManager.add_show(openRadWindow); // Attach event handler to the newly opened windows 
        function openRadWindow(oWindow, args) 
            if (oWindow.get_id() == "fileExplorerUpload"
                var chkBoxID = oFileExplorer.get_id() + "_chkOverwrite"// Build the ID of the checkbox 
                var checkBox = document.getElementById(chkBoxID); 
                checkBox.style.display = "none";// Hide the check box 
                checkBox.nextSibling.style.display = "none"// Hide the text next to the checkbox ; 

    I suggest that client approach, because the RadFileExplorer1.Upload.ControlObjectsVisibility server property does not accept the passed values. We assign value to this property in a later stage of the RadFileExplorer's life cycle and this cause that behavior.

    I hope this helps.

    All the best,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft R3 2016 release webinar banner
  4. Bob van der Zinch
    Bob van der Zinch avatar
    10 posts
    Member since:
    Feb 2010

    Posted 24 May 2010 Link to this post

    if (oWindow.get_id() == "fileExplorerUpload")  
    this condition should be fixed this way I guess

    if (oWindow.get_id() == oFileExplorer.get_windowManager().get_id() + "fileExplorerUpload")  
Back to Top