How to display progress bar or waiting bar on button click to perform long actions like loading tons of data from the database.

  1. #1

    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.

    http://examples1.ext.net/#/Miscellan...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.
    http://examples1.ext.net/#/Miscellan...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 12:05 PM.
  2. #2
    From a user perspective: Use remote paging or buffered grid instead of loading thousands of rows in your grid

    rgds /Peter
  3. #3
    Quote Originally Posted by plykkegaard View Post
    From a user perspective: Use remote paging or buffered grid instead of loading thousands of rows in your grid

    rgds /Peter
    Thanks for ur suggestion. We are already doing this in our new projects.
    But as my project was already existed and working with different customers, here is no chance to change all these codes now.

Similar Threads

  1. Replies: 1
    Last Post: Jan 17, 2012, 6:56 AM
  2. [CLOSED] Loading data in store take too long. browser hangs.
    By speedstepmem3 in forum 1.x Premium Help
    Replies: 21
    Last Post: Nov 22, 2011, 8:42 AM
  3. Replies: 1
    Last Post: Aug 01, 2011, 10:08 AM
  4. Replies: 0
    Last Post: Jan 04, 2011, 3:16 PM
  5. Replies: 0
    Last Post: Jul 23, 2010, 6:35 AM

Tags for this Thread

Posting Permissions