This is a migrated thread and some comments may be shown as answers.
Need to pass progress events from dll
3 Answers 4 Views
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 19 Mar 2015, 11:59 AM
I need to setup progress area for lengthy logic that located in dll outside the page.

Not sure how to approach this.

Please help

3 Answers, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 20 Mar 2015, 08:12 AM
Hi David,

This is how you can start Custom Progress:

protected void Button1_Click(object sender, EventArgs e)
{
    RadProgressContext context = RadProgressContext.Current;
    context.SecondaryTotal = "100";
    for (int i = 1; i < 100; i++)
    {
        context.SecondaryValue = i.ToString();
        context.SecondaryPercent = i.ToString();
        context.CurrentOperationText = "Doing step " + i.ToString();
        if (!Response.IsClientConnected)
        {
            //Cancel button was clicked or the browser was closed, so stop processing
            break;
        }
        // simulate a long time performing the current step
        System.Threading.Thread.Sleep(100);
    }
}

I hope this helps.

Regards,
Hristo Valyavicharski
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
David
Top achievements
Rank 1
answered on 20 Mar 2015, 12:10 PM
Hristo,

   My question is regarding situation with logic located in dll. In case my problem isn't clear, from inside the dll i can't access Progress Area which is on the page.
   Is there some way to send updates to Progress Area from dll?
0
Hristo Valyavicharski
Telerik team
answered on 20 Mar 2015, 02:49 PM
There is no way to access RadProgressArea from external assembly. I suggest that you refer this assembly to your web application and call the logic from the code behind of the web page where the RadProgressArea is.

Regards,
Hristo Valyavicharski
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.

 
Asked by
David
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
David
Top achievements
Rank 1
Share this question
or