Updating HeaderText

2 posts, 0 answers
  1. Developer
    Developer avatar
    38 posts
    Member since:
    Apr 2014

    Posted 10 Jun Link to this post

    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? 
  2. Peter Milchev
    Admin
    Peter Milchev avatar
    139 posts

    Posted 15 Jun Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top