Progress Bar -On click Button -Grid view Column -Asp.net

221 views Asked by At

I have a GridView in which the last Column has a Button which loads data. Doing that takes like 2 Minutes. So, I need the user to know that some functions are going on in backend not that the screen is frozen So, I need to show ProgressBar in a click of that button inside the GridView How to do that??

please advice on this

Thanks in Advance.

1

There are 1 answers

0
Dominik Witek Witkowski On

if You have some functions which do this operation You can set global boolean, which show when this function ended and then check if function is ended set progress bar value higher.

    private bool functionLoaded = false;

private void first()
{
    //some code
    functionLoaded = true;
}

private void NumberOfScenariosChanged(Object sender, EventArgs e)
{

    if (functionLoaded)
         return;        

    UpdateScenarioDataGrid();

}

Or if always it takes 2 minutes You can do a little trick and create second thread which rising progress bar value moment by moment. It will be only for show for user that program is not stopped.