How to hide the RadFileExplorer upload info panel

6 posts, 0 answers
  1. sandhya
    sandhya avatar
    12 posts
    Member since:
    May 2011

    Posted 03 Jun 2011 Link to this post

    HI Telerik,

    How to hide the RadFileExplorer upload info panel.Once i click on upload Upload window will dispaly.
    I want to hide the below path while clicking the upload button.
    ----------------------------------------------------------------------------
    Max file size allowed:
    25.00 MB
    File extensions allowed:
    *.au, *.css, *.doc, *.docm, *.docx, *.dotm, *.dotx, *.flv, *.gif, *.htm, *.html, *.jar, *.jpe, *.jpeg, *.jpg, *.js, *.mov, *.mp2, *.mp3, *.mpa, *.mpv2, *.pdf, *.png, *.potm, *.potx, *.ppam, *.ppsm, *.ppsx, *.ppt, *.pptx, *.pptm, *.pptx, *.swf, *.txt, *.vsd, *.vss, *.xhtml, *.xlam, *.xls, *.xlsx, *.xlsb, *.xlsm, *.xlsx, *.xltm, *.xltx, *.xsd, *.zip
    ---------------------------------------------------------------------------------------------
    Is there any posibility ..please reply me as soon as posible.

    Thanks
    Bhavani
  2. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 06 Jun 2011 Link to this post

    Hi Bhavani,

    You can hide the info panel in the Upload dialog using the code below:

    Default.aspx:
    <telerik:RadFileExplorer ID="FileExplorer1" runat="server" Height="300px" Width="804px"
        Skin="Telerik">
        <Configuration SearchPatterns="*.*" UploadPaths="~/images/" ViewPaths="~/images/"
            DeletePaths="~/images/"></Configuration>
    </telerik:RadFileExplorer>
    <script type="text/javascript">
     
        function OnToolBarButtonClicked(oToolbar, args) {
            var toolbarItem = args.get_item();
     
            if (toolbarItem.get_value() == "Upload") {// upload is clicked
                var uploadContainerID = "<%= FileExplorer1.ClientID %>_uploadContainer";
                var uploadContainer = $telerik.$("#" + uploadContainerID).get(0); // Find the uplaod RadWindow's UploadContainer
                var fileExplorerClientId = "<%= FileExplorer1.ClientID %>"; // the client id of the RadFileExplorer
     
                var infoPanel = $telerik.$(".rfeUploadInfoPanel", uploadContainer); // Find the upload info
                infoPanel.css("display", "none"); // hide it
            }
        }
    </script>


    Default.aspx.cs:
    protected void Page_Load(object sender, EventArgs e)
    {
        FileExplorer1.ToolBar.OnClientButtonClicked = "OnToolBarButtonClicked";
    }


    Best regards,
    Rumen
    the Telerik team

    Browse the vast support resources we have to jump start 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.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. sandhya
    sandhya avatar
    12 posts
    Member since:
    May 2011

    Posted 06 Jun 2011 Link to this post

    Hi Rumen

    Thanks alot for your solution.perferctly It works for me..:-)
    I have one more question .After hiding uploadinfopanel div,the upload button is coming up.I want to decrese the height of uploadcontainer.
    Is there any possiblity to achieve this task?Please find the attached image for ur reference.
    Waiting for ur reply.

    Thanks once again.

    Thanks
    sandhya

  5. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 07 Jun 2011 Link to this post

    Hi sandhya,

    The upload dialog is a RadWindow control and you can manually change its height by calling its set_height() method. To achieve this you need to extend the function provided by Rumen to get reference to the RadWindow's client-side object and execute set_height(), e.g:
    function OnToolBarButtonClicked(oToolbar, args)
    {
        var toolbarItem = args.get_item();
     
        if (toolbarItem.get_value() == "Upload")
        {// upload is clicked
            var uploadContainerID = "<%= FileExplorer1.ClientID %>_uploadContainer";
            var uploadContainer = $telerik.$("#" + uploadContainerID).get(0); // Find the uplaod RadWindow's UploadContainer
            var fileExplorerClientId = "<%= FileExplorer1.ClientID %>"; // the client id of the RadFileExplorer
     
            var infoPanel = $telerik.$(".rfeUploadInfoPanel", uploadContainer); // Find the upload info
            infoPanel.css("display", "none"); // hide it
     
            setTimeout(function () //set small timeout to ensure that the dialog is displayed and its size is calculated
            {
                var explorer = $find("<%=FileExplorer1.ClientID%>");
                var wndManager = explorer.get_windowManager(); //get reference to RadFileExplorer's window manager
                var wnd = wndManager.getActiveWindow();//get reference to the upload dialog's window
                wnd.set_height(parseInt(wnd.get_contentElement().clientHeight) + wnd.get_defaultMinHeight());
            },200);
        }
    }

    I hope this helps.

    Best wishes,
    Dobromir
    the Telerik team

    Browse the vast support resources we have to jump start 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.

  6. sandhya
    sandhya avatar
    12 posts
    Member since:
    May 2011

    Posted 14 Jun 2011 Link to this post

    Hi,

    Thanks for your reply.
    After applying your logic design is crashing in 2 upload click events(Toolbar upload and gridcontext menuupload)
    See the attached images and reply me as soon as posible

    Thanks
    Sandhya

  7. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 17 Jun 2011 Link to this post

    Hello Sandhya,

    I was able to fix the demonstrated side effect by attaching to the add_added event of RadUpload and resizing the dialog:
    <telerik:RadFileExplorer ID="FileExplorer1" runat="server" Height="300px" Width="804px"
        Skin="Telerik">
        <Configuration SearchPatterns="*.*" UploadPaths="~/images/" ViewPaths="~/images/"
            DeletePaths="~/images/"></Configuration>
    </telerik:RadFileExplorer>
    <script type="text/javascript">
     
        function OnToolBarButtonClicked(oToolbar, args) {
            var toolbarItem = args.get_item();
     
            if (toolbarItem.get_value() == "Upload") {// upload is clicked
                var uploadContainerID = "<%= FileExplorer1.ClientID %>_uploadContainer";
                var uploadContainer = $telerik.$("#" + uploadContainerID).get(0); // Find the uplaod RadWindow's UploadContainer
                var fileExplorerClientId = "<%= FileExplorer1.ClientID %>"; // the client id of the RadFileExplorer
     
                var infoPanel = $telerik.$(".rfeUploadInfoPanel", uploadContainer); // Find the upload info
                infoPanel.css("display", "none"); // hide it
     
     
     
                setTimeout(function () //set small timeout to ensure that the dialog is displayed and its size is calculated
                {
                    var explorer = $find("<%=FileExplorer1.ClientID%>");
                    var wndManager = explorer.get_windowManager(); //get reference to RadFileExplorer's window manager
                    var wnd = wndManager.getActiveWindow(); //get reference to the upload dialog's window
                   
                    wnd.set_height(parseInt(wnd.get_contentElement().clientHeight) + wnd.get_defaultMinHeight());
     
     
                    var uploadControl = $find("FileExplorer1_upload1");
                    uploadControl.add_added(function () {
                        wnd.set_height(parseInt(wnd.get_contentElement().clientHeight) + wnd.get_defaultMinHeight() + 30);
                    });
                }, 200);
     
                 
            }
        }
    </script>


    All the best,
    Rumen
    the Telerik team

    Browse the vast support resources we have to jump start 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
UI for ASP.NET Ajax is Ready for VS 2017