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

Updating HeaderText

1 Answer 36 Views
ProgressArea
This is a migrated thread and some comments may be shown as answers.
Developer
Top achievements
Rank 1
Developer asked on 10 Jun 2016, 03:09 PM
Hi,
I use a radprogressarea within a radwizard step.  In this step  I would like to report the progress of two operations.
How can I get the headertext to change when the second operation starts?
I’ve tried the obvious, by putting the following just before the second operation completes

RadProgressArea3.HeaderText = "Processing Number 2";


Does the control need to be included within the Ajax manager? 

1 Answer, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 15 Jun 2016, 01:46 PM
Hello,

You cannot change the HeaderText from the code behind dynamically. However you could change the text in the progress header using the following OnClientProgressUpdatingHandler: 

<script>
    function OnClientProgressUpdatingHandler(sender, args) {
        var progressArea = sender.get_element()
        progressArea.firstElementChild.textContent = args.get_progressData().CurrentOperationText;
    }
</script>

In the provided code snippet the header text is updated to be the same as the text of the current operation. Feel free to modify it according to your scenario. 

Regards,
Peter Milchev
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
ProgressArea
Asked by
Developer
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or