C# Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • melryin
    New Member
    • Dec 2008
    • 5

    #1

    C# Problem

    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:

    Code:
     BackgroundWorker bgw = new BackgroundWorker();
    
     bgw.DoWork += delegate
     {
            //Code for exporting data 
      };
    
      bgw.RunWorkerAsync();
      FrmProgress progress = new FrmProgress();
      progress.Show();
    
      bgw.RunWorkerCompleted += 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!
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    I am moving this to the .NET forum.

    Comment

    Working...