Hi,
Im trying to use the progress area as per the example on the website.
Following is the piece of code:
In the above piece of code, i have only changed total = 1200 from 100 in the example and tryingt o show the percentage.
It always shows 0.
Im trying to use the progress area as per the example on the website.
Following is the piece of code:
private void UpdateProgressContext()
{
const int total = 1200;
RadProgressContext progress = RadProgressContext.Current;
progress.Speed = "N/A";
for (int i = 0; i < total; i++)
{
progress.PrimaryTotal = 1;
progress.PrimaryValue = 1;
progress.PrimaryPercent = 100;
progress.SecondaryTotal = total;
progress.SecondaryValue = i;
int per = (i/total)*100;
progress.SecondaryPercent = per;
progress.CurrentOperationText = "Step " + i.ToString() + " Per = " + per.ToString();
if (!Response.IsClientConnected)
{
//Cancel button was clicked or the browser was closed, so stop processing
break;
}
progress.TimeEstimated = (total - i) * 100;
//Stall the current thread for 0.1 seconds
System.Threading.Thread.Sleep(100);
}
}
In the above piece of code, i have only changed total = 1200 from 100 in the example and tryingt o show the percentage.
It always shows 0.