|
-
Jul 13th, 2010, 02:50 AM
#1
Thread Starter
Member
-
Jul 13th, 2010, 03:00 AM
#2
Re: Accessing DataGridView from parallel thread
The same goes for any control: you cannot access it form any thread other than the one it was created on. You need to do as much work as you can on the secondary thread but actually adding the values to the grid MUST be done on the UI thread. I would suggest generating your list on the secondary thread and then simply binding that list on the UI thread. Follow the CodeBank link in my signature and check out my posts on Using The BackgroundWorker and Access Controls From Worker Threads for more information. If you need more help then please provide a more complete description of exactly what you're doing, i.e. exactly what data is in the grid and how it gets there.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|