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

Dynamically change the title?

3 Answers 89 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Moon Yau
Top achievements
Rank 1
Moon Yau asked on 11 Jun 2009, 05:17 AM
Is the title of "Upload Done" or "Select File to upload" can be changed during runtime?
Or is there any method that can reset the title from "Upload Done" back to "Select File to upload"?
Btw what is the use of SetInitialUIState method?

3 Answers, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 11 Jun 2009, 04:19 PM
Hi Moon Yau,

Thank you for your interest in our RadUpload control.

The control changes its title depending on the current state. If you want to change the text inside the title you can rely on localization mechanism - more about it you can find in following articles:

About the SetInitialUIState method: its role is to clean the control's look:
  • Removing all items from the upload list;
  • initializing the total size and total percent to zero;
  • initializing the title to the value of "Select files to upload";
  • Initialize the buttons' visibility.
Please note in the current development stage there are some changes in the uploader's code (and functionality) and it may differs in the upcoming release.

Hope this information helps.

All the best,
Ivan
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
Moon Yau
Top achievements
Rank 1
answered on 12 Jun 2009, 06:37 AM
- initializing the title to the value of "Select files to upload"


But I called the SetInitialUIState() after the UploadFinished event
the title "Upload Done" did not change back to Select files to upload




0
Accepted
Ivan
Telerik team
answered on 12 Jun 2009, 12:18 PM
Hi Moon Yau,

Thank you for the clarification. Indeed, after the UploadFinished event has been rised, the upload engine sets the control's title to "Upload Done". If you want to change the title you have to delay the initialization - for example, you can try the Dispatcher.BeginInvoke() method like this:

private void RadUpload1_UploadFinished(object sender, EventArgs e)  
{  
    Dispatcher.BeginInvoke(() => this.RadUpload1.SetInitialUIState());  

I hope this helps. Let me know if you have other questions.

Greetings,
Ivan
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.
Tags
Upload
Asked by
Moon Yau
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Moon Yau
Top achievements
Rank 1
Share this question
or