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

How do I change button labels in upload panel?

5 Answers 193 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Charles
Top achievements
Rank 1
Charles asked on 15 Jul 2009, 03:01 PM
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?

5 Answers, 1 is accepted

Sort by
0
Charles
Top achievements
Rank 1
answered on 16 Jul 2009, 03:19 PM
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"
0
Lini
Telerik team
answered on 17 Jul 2009, 09:00 AM
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.
0
Jon Shipman
Top achievements
Rank 1
answered on 09 Mar 2011, 09:02 PM
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);
}
0
Majid Mahmoodi
Top achievements
Rank 1
answered on 07 Aug 2011, 07:16 AM
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" };


}
0
Jon Shipman
Top achievements
Rank 1
answered on 08 Aug 2011, 07:48 PM
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>
Tags
FileExplorer
Asked by
Charles
Top achievements
Rank 1
Answers by
Charles
Top achievements
Rank 1
Lini
Telerik team
Jon Shipman
Top achievements
Rank 1
Majid Mahmoodi
Top achievements
Rank 1
Share this question
or