monitor progress in component

Thread is closed for posting
5 posts, 0 answers
  1. Albert Shenker
    Albert Shenker avatar
    579 posts
    Member since:
    Mar 2004

    Posted 17 Sep 2008 Link to this post

    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.
  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 18 Sep 2008 Link to this post

    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.
  3. Albert Shenker
    Albert Shenker avatar
    579 posts
    Member since:
    Mar 2004

    Posted 18 Sep 2008 Link to this post

    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.
  4. Erjan Gavalji
    Admin
    Erjan Gavalji avatar
    1455 posts

    Posted 23 Sep 2008 Link to this post

    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.
  5. Albert Shenker
    Albert Shenker avatar
    579 posts
    Member since:
    Mar 2004

    Posted 23 Sep 2008 Link to this post

    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.
Back to Top