I need some help on showing Progress bar upon loading data on my DataGridView. Any sample code?
Thanks.
regards,
kurt
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Start the fetching of the data on another thread in order to not lock up the UI thread. You could expose a method on the UI (presume you have separation of layers here) and call that method from your business layer. Windows Form controls expose a InvokeRequired flag that you can use to check if you are calling the control from the correct thread. If you are not on the right thread you can call a delegate to do so.
Or you could just use a BackgroundWoker 😉