How do I change button labels in upload panel?

6 posts, 0 answers
  1. Charles
    Charles avatar
    19 posts
    Member since:
    Sep 2008

    Posted 15 Jul 2009 Link to this post

    Hi - my users are asking me to change the text on the buttons in the upload panel to say "Browse" instead of "Select" - on the RadUpload control this would be a <localization> setting, but this doesn't appear to be the case with the FileExplorer's upload panel - what files/settings do I need to look at to make this change?
  2. Charles
    Charles avatar
    19 posts
    Member since:
    Sep 2008

    Posted 16 Jul 2009 Link to this post

    It looked to me from the docs like putting this in the codebehind would take care of it, but no such luck. (FileExplorer1 is the id of my RadFileExplorer control) - this is C#

    FileExplorer1.Upload.Localization.Select = "Browse"
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 17 Jul 2009 Link to this post

    Hello,

    The RadFileExplorer control follows the same localization mechanism as the RadEditor (.resx files in the App_GlobalResources folder). If you want to change some of the file explorer localization, you need to copy the RadEditor.Dialogs.resx file to the App_GlobalResources folder of your application and edit the strings inside. For example, to change the upload "select" button text, you need to edit the "Common_Select" string. See the attached screenshot for more details.

    The value you have set in the codebehind is overwritten with the value from the resource file. If you need to set the value from the codebehind, you need to do it after the PreRender event of the FileExplorer, because that is when the control localization is set.

    Sincerely yours,
    Lini
    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.
  5. Jon Shipman
    Jon Shipman avatar
    43 posts
    Member since:
    Nov 2009

    Posted 09 Mar 2011 Link to this post

    The article on how to work with the .resx file and so forth is here. Although the C# example in that article is correct, as Lini states, if you don't run that after PreRender, it won't do anything. If you don't want to mess with the Global .resx stuff you can put the following on your page.

    protected override void OnPreRenderComplete(EventArgs e)
    {
        FileExplorer1.Upload.Localization.Select = "Browse...";
     
        base.OnPreRenderComplete(e);
    }
  6. Majid Mahmoodi
    Majid Mahmoodi avatar
    4 posts
    Member since:
    Feb 2007

    Posted 07 Aug 2011 Link to this post

    Hi,
    In PageLoad()  fileExplorer1.Upload is null and fileExplorer1 is not null


    my code is :

    protected void Page_Load(object sender, EventArgs e)
    {
                //throw exception Object reference not set to an instance of an object.
                FileExplorer1.Upload.AllowedFileExtensions = new string[] { "*.flv", "*.mov", "*.mp4" };


    }
  7. Jon Shipman
    Jon Shipman avatar
    43 posts
    Member since:
    Nov 2009

    Posted 08 Aug 2011 Link to this post

    Hello Majid,

    I tried an example and I couldn't get the Upload control to be null inside the Page_Load().  However, if you don't configure the UploadPaths property, the Upload control will be null at the time of the OnPreRenderComplete() event.

    Do you have your RadFileExplorer paths configured similarly to that shown below?

    <telerik:RadFileExplorer ID="FileExplorer1"
        runat="server">
        <Configuration
            ViewPaths="~/uploads"
            UploadPaths="~/uploads"
            DeletePaths="~/uploads"/>
    </telerik:RadFileExplorer>
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017