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

On Complete Event for RadProgressArea?

3 Answers 172 Views
ProgressArea
This is a migrated thread and some comments may be shown as answers.
Gary
Top achievements
Rank 1
Gary asked on 10 Sep 2014, 10:48 PM
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.

3 Answers, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 15 Sep 2014, 12:48 PM
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.

 
0
Gary
Top achievements
Rank 1
answered on 15 Sep 2014, 02:39 PM
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.
0
Accepted
Boyan Dimitrov
Telerik team
answered on 17 Sep 2014, 12:35 PM
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.

 
Tags
ProgressArea
Asked by
Gary
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Gary
Top achievements
Rank 1
Share this question
or