1

When Fetching the data from database and bind the data as table in between time,How to show Progress Bar in Windows Applications. I have little confusion about Thread and BackgroundWorker.

Any one tell me sample code for running Progress Bar with Percentage at the same time fetch the data from database.

Saba
  • 61
  • 9

1 Answers1

0

For Progress Bar you need to do following steps

  1. Set ProgressBar.Minimum=1
  2. Set ProgressBar.Maximum=dataTable.rows.count
  3. Set ProgressBar.Step = 1
  4. Apply foreach loop on datatable rows that contains data as
foreach (Datarow row in datatable.rows)   
 {    
    prgBarRemittance.PerformStep();  
 }
VVN
  • 1,607
  • 2
  • 16
  • 25
Basit Syed
  • 331
  • 3
  • 4