0

I have an application which is using multithreads. I am using threads, becuase applicaiton is used by a user and it runs a database process in background. I dont want application to be frozen while it is doing database process. Everything is fine upto here.

Now, I need to display the processed datas to the user every 10 seconds. I will basically run a SELECT statement to DB and display the result on grid. I tried to run SELECT statement in the thread and display it in grid, but thread is static and Winform/GridControl is not. How can I refresh the gridcontrol's data every 10 seconds without freezing?

Arif YILMAZ
  • 5,754
  • 26
  • 104
  • 189

1 Answers1

2

Check out these other answers. You can safely update the UI thread from background threads using these methods:

update a control in UI with running background Thread in Winforms

How to update the GUI from another thread in C#?

Community
  • 1
  • 1
T. Yates
  • 192
  • 11