开发者

How to display data into datagridview using multi thread?

开发者 https://www.devze.com 2022-12-27 15:16 出处:网络
I have application where I read/receive data all the time (text) and I need to display this data into datagridview, what is the best way to do that in real time, so the data will be changed all the ti

I have application where I read/receive data all the time (text) and I need to display this data into datagridview, what is the best way to do that in real time, so the data will be changed all the time.

I thought about multi threading, if this is a good idea can you guide me with link to explain how to imple开发者_Python百科ment it.

Thanks


You can use a BackgroundWorker to execute a thread in the background to receive data. Then you need to use Control.Invoke to marshall calls to the UI thread to update data.

This link provides some example code you can use as a starting point.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号