Hi,
I'm a novice in C#. I wrote a program to export data from datagridview. While exporting, a pop-up window shows the progress of file exporting.
The code is as follow:
BackgroundWorke r bgw = new BackgroundWorke r();
bgw.DoWork += delegate
{
//Code for exporting data
};
bgw.RunWorkerAs ync();
FrmProgress progress = new FrmProgress();
progress.Show() ;
bgw.RunWorkerCo mpleted += delegate
{
progress.Close( );
};
The progress bar modal window showed up while exporting data, but the progress bar is not updated. I tried reportprogress but it didn't work. Probably I didn't use it in the right way.
Can anyone help me with this? I have no idea how to do it.
Thanks in advance!
I'm a novice in C#. I wrote a program to export data from datagridview. While exporting, a pop-up window shows the progress of file exporting.
The code is as follow:
BackgroundWorke r bgw = new BackgroundWorke r();
bgw.DoWork += delegate
{
//Code for exporting data
};
bgw.RunWorkerAs ync();
FrmProgress progress = new FrmProgress();
progress.Show() ;
bgw.RunWorkerCo mpleted += delegate
{
progress.Close( );
};
The progress bar modal window showed up while exporting data, but the progress bar is not updated. I tried reportprogress but it didn't work. Probably I didn't use it in the right way.
Can anyone help me with this? I have no idea how to do it.
Thanks in advance!
Comment