views:

221

answers:

2

I followed google to this MSDN forum thread.

The last answer was and I qoute : "Using threads? Don't"

Does someone knows a walk around?

As far as I can tell, I'm playing the cards well. I'm using BeginInvoke inorder to populate the data source inside the UI thread.

More details :

I've got a background thread that make queries to a Sql Compact edition DB using LINQ to SQL.

After that I'm calling the method that would have updated the DataSource with BeginInvoke:

A: 

So your question is:

"how do I populate a datagrid in a background thread?"

Sam
Sam, thanks. I know the basics and I'm using BegkinInvoke (note that I've edited the question).I guess that it is not a regular"A guy is updating the UI from a background thread" :)
ArielBH
I was not sure what your question was about - honestly, I still not see what your problem is, or what you really want to ask, maybe you should specify your question more, write what your problem is, what ain't working like you expect it to...Without bricks we can't build a house...
Sam
Sam, thanks. but I've provided a link to a forum thread that say all of this. why repeat it again?
ArielBH
+1  A: 

if you're doing that then use the background worker component and on its report progress event populate your grid with already returned data.

Mladen
I'm using it, but as I said it's a weird exception
ArielBH