Setting size and position of 'Upload' window

2 posts, 0 answers
  1. archimede
    archimede avatar
    103 posts
    Member since:
    Jul 2006

    Posted 20 Jun 2013 Link to this post

    Good day,

    We're using one fileexplorer in a page.
    When we press the 'Upload' button of the file explorer, a window appears with file selector open button, overwrite flag, filter label, etc.
    We are unable to understand how to position and size the Upload window.

    How can we change size and position when opening the Upload window?

    We'd like to also know:
    - Is it possible to change the 'Filename' and 'Size' labels of the file explorer?
    - Is it possible to set size and position of the -file open- window (the one that appears when pressing 'Select' in the upload window)?

    Thanks in advance
  2. Ivaylo
    Ivaylo avatar
    37 posts

    Posted 25 Jun 2013 Link to this post

    Hello Archimede,

    Regarding your first question, in order to change the position of the Upload Dialog, you will need to get a reference to the upload window in the ClientClick event of the 'Upload' button and use the window moveTo() method. To do so, you will have to attach a handler to the button's click event on the server, as in the following example where OnClientUploadClick is the JavaScript function that will handle the event:

    void Page_Load(object sender, EventArgs e)
        RadFileExplorer1.ToolBar.OnClientButtonClicked = "OnClientUploadClick";

    The following JavaScript goes to your main page. Feel free to modify the assigned values, so that they better fit your project's requirements.

    OnClientUploadClick() {
        //implement your logic for the desired position of the window
        var xPos = 100;
        var yPos = 100;
        //setTimeout to allow some time for the window reference to be created
        setTimeout( function() {
            var curWnd = $find("RadFileExplorer1").get_windowManager().getActiveWindow();
            if (curWnd.get_title() == "Upload") {

    For convenience I am attaching the sample project I have used to test the functionality.

    As for changing the 'Filename' and 'Size' label, you can refer to the following two articles, which give an in-depth explanation of how to achieve this:
    All you need to do is copy the RadEditor.Dialogs.resx file into App_GlobalResources folder and edit the relative entries in the table. The specific values that you need to change are: Common_SortBySize and Common_SortByFilename.

    To answer your third question, I am afraid that there is a browser limitation that does not allow us to change the position of the File Browser Dialog.

    I hope that you will find the provided information helpful.

    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. DevCraft R3 2016 release webinar banner
Back to Top