This is a migrated thread and some comments may be shown as answers.

How to hide the RadFileExplorer upload info panel

5 Answers 237 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
sandhya
Top achievements
Rank 1
sandhya asked on 03 Jun 2011, 10:38 AM
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

5 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 06 Jun 2011, 07:48 AM
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.

0
sandhya
Top achievements
Rank 1
answered on 06 Jun 2011, 08:17 AM
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

0
Dobromir
Telerik team
answered on 07 Jun 2011, 04:37 PM
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.

0
sandhya
Top achievements
Rank 1
answered on 14 Jun 2011, 12:50 PM
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

0
Rumen
Telerik team
answered on 17 Jun 2011, 08:43 AM
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.

Tags
FileExplorer
Asked by
sandhya
Top achievements
Rank 1
Answers by
Rumen
Telerik team
sandhya
Top achievements
Rank 1
Dobromir
Telerik team
Share this question
or