On Complete Event for RadProgressArea?

4 posts, 1 answers
  1. Gary
    Gary avatar
    20 posts
    Member since:
    Oct 2012

    Posted 10 Sep 2014 Link to this post

    I am using the RadProgressArea to show the progress of a long running custom process on the server. When the process is complete, I set the RadProgressContext.Current.OperationComplete = true. At this point the RadProgressArea disappears. 

    Is there any way to fire an event on the client side when the RadProgressContext.Current.OperationComplete property is set to true? I would like to run some javascript code showing telling the user that the process has completed successfully or display any information from the process.
  2. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 15 Sep 2014 Link to this post

    Hello,

    I would like to clarify that there is no complete event in the RadProgressArea API. A similar functionality could be achieved by registering a client-side script from the code behind once you set the RadProgressContext.Current.OperationComplete = true.
    Below you may find a sample code snippet that demonstrates the described approach:
    //JavaScript
    function closeArea() {
                   alert(1);
                   Sys.Application.remove_load(openForm);
               }
    //code behind
    if (i == 2)
                {
                    RadProgressContext.Current.OperationComplete = true;
                    ScriptManager.RegisterStartupScript(Page, GetType(), "formScript", "Sys.Application.add_load(closeArea);", true);
                }



    Regards,
    Boyan Dimitrov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Gary
    Gary avatar
    20 posts
    Member since:
    Oct 2012

    Posted 15 Sep 2014 in reply to Boyan Dimitrov Link to this post

    Thanks Boyan.

    In that case, is there a way to control the appearance of the RadProgress area via javascript/css? Then I could force it to remain open even after setting RadProgressContext.Current.OperationComplete = true and then close it after my client script finishes.
  5. Answer
    Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 17 Sep 2014 Link to this post

    Hello,

    The RadProgressArea client-side object does provide show() and hide() methods.
    //JavaScirpt
    function showProgressArea() {
       $find("RadProgressArea1").show();
    }



    Regards,
    Boyan Dimitrov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top