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

monitor progress in component

4 Answers 70 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Albert Shenker asked on 17 Sep 2008, 08:29 PM
Are there any examples on this site, or can anyone point me to some web resource that discusses monitoring the progress of a process within a component using RadProgressArea? I have a web page in which I would like to use the RadProgressArea control. Ther is a button, which when clicked, invokes some methods in a component (the component in turn does some processing of database records). This component performs measurable actions, and I have access to modify the component if necessary, however, I can't quite figure out how to "inform" the progress area as processes are occuring within the component.

4 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 18 Sep 2008, 09:09 AM
Hi Albert Shenker,

Have you checked these online resources:

I hope this will get you started.

Greetings,
Veskoni
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 18 Sep 2008, 01:57 PM
Yes I have looked at those, but in those cases, it is the page that knows all about updating the progress. In other words, there is a method in the page that does this. You click on a button, a method is called which represents a process and that method in turn updates the progressbar as the process occurs.

In my case the page inherrently knows nothing about the progress of the process... only the component does. Its almost like I need some sort of "listener". I am familiar with how to raise events from controls and could probably accomplish something like this using that framework, but the component is not a control... just a code library.
0
Erjan Gavalji
Telerik team
answered on 23 Sep 2008, 01:50 PM
Hi Albert,

Looking at the problem from the ASP.NET perspective, there should be a page event that calls a method from the code library you have.

If the code library assembly has a reference to the Telerik.Web.UI assembly, it can use the RadProgressContext.Current object to update the progress. However, if the code library does not create a RadProgressManager object, the code can become error prone.

You can instead prefer exposing an ProcessProgressUpdated event (or something like that), which the page will consume. The event handler would update the RadProgressContext.Current object. So, from the perspective of the page, the sequence would be:
  • Trigger a page event (e.g. press a button);
  • Create the process management object;
  • Attach an event handler to the process management object's ProcessProgressUpdated event;
  • Start the process;
  • Add code to the ProcessProgressUpdated event handler to update RadProgressContext.Current.
I hope this helps.

Kind regards,
Erjan Gavalji
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 23 Sep 2008, 05:14 PM
I managed to get some events added to the component. By adding a "WithEvents" to the declaration of the component in my page, I am now able to handle the events and update the progress area accordingly. This works beautifully! Thanks for your suggestions.
Tags
Upload (Obsolete)
Asked by
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Answers by
Veselin Vasilev
Telerik team
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Erjan Gavalji
Telerik team
Share this question
or