Dec 18, 2011, 12:56 PM
How to display progress bar or waiting bar on button click to perform long actions like loading tons of data from the database.
Hi Friends,
I want to display progress bar or waiting bar on button click to perform long actions like loading tons of data from the database and displaying in Grid.
I have seen an example showing waiting bar in the below link.
https://examples1.ext.net/#/Miscella...t_Side_Update/
But here they hard coded the values of Interval and Duration and Increment of ext:ProgressBar control. But in real scenarios, we don't know how much it will take to perform long operations. How can i implement this in my scenario?
One more thing is i wanted to display this waiting bar from code behind and with asp button click (not using ext button here, coz my code is already implemented with asp button controls).
Simply My requirement is I Need to show waiting bar on asp.net button click and should show until the data gets bound to the Grid.
I have implemented this like below. But it is not working.
In aspx:
Note: I have already looked in to the below link. but here u are using for loop to manually increment the progress value and using ext button.
https://examples1.ext.net/#/Miscella...r_Side_Update/
How to resolve this. Plz help me asap.
Thanks in Advance,
Santhosh Kumar G
I want to display progress bar or waiting bar on button click to perform long actions like loading tons of data from the database and displaying in Grid.
I have seen an example showing waiting bar in the below link.
https://examples1.ext.net/#/Miscella...t_Side_Update/
But here they hard coded the values of Interval and Duration and Increment of ext:ProgressBar control. But in real scenarios, we don't know how much it will take to perform long operations. How can i implement this in my scenario?
One more thing is i wanted to display this waiting bar from code behind and with asp button click (not using ext button here, coz my code is already implemented with asp button controls).
Simply My requirement is I Need to show waiting bar on asp.net button click and should show until the data gets bound to the Grid.
I have implemented this like below. But it is not working.
In aspx:
<ext:ProgressBar ID="ProgressBar2" runat="server" Width="300" />
<asp:Button runat="server" ID="btnProgress" OnClick="btnProgress_Click" Text="Show me Progrss" />
In cs:protected void btnProgress_Click(object sender, EventArgs e)
{
ProgressBar2.Show(); //Showing waiting bar here like this
ProgressBar2.Wait();
ProgressBar2.UpdateProgress(1, "Loading..");
Do process to get the data from db and bind it to grid. While processing waiting bar should show on the page.
//ProgressBar2.Reset(true);
//ProgressBar2.Hide(); //Hiding waiting bar here
}
When i commented the reset() and hide() lines in the above code, Waiting bar is showing continuosly as expected. But how to close it when processing gets finish.Note: I have already looked in to the below link. but here u are using for loop to manually increment the progress value and using ext button.
https://examples1.ext.net/#/Miscella...r_Side_Update/
How to resolve this. Plz help me asap.
Thanks in Advance,
Santhosh Kumar G
Last edited by santhu12smart; Dec 18, 2011 at 1:05 PM.