Click here to Skip to main content
15,895,011 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralTracking system Pin
kipchirchir11-Aug-12 20:50
kipchirchir11-Aug-12 20:50 
GeneralRe: Tracking system Pin
Richard MacCutchan11-Aug-12 21:42
mveRichard MacCutchan11-Aug-12 21:42 
QuestionEncrypting File Problem Pin
jitforce258511-Aug-12 10:40
jitforce258511-Aug-12 10:40 
AnswerRe: Encrypting File Problem Pin
André Kraak11-Aug-12 11:37
André Kraak11-Aug-12 11:37 
GeneralRe: Encrypting File Problem Pin
jitforce258512-Aug-12 4:45
jitforce258512-Aug-12 4:45 
Questionhow to create a boolean property in user control and that can be used ? Pin
ankita.rose911-Aug-12 0:28
ankita.rose911-Aug-12 0:28 
AnswerRe: how to create a boolean property in user control and that can be used ? Pin
Eddy Vluggen11-Aug-12 0:38
professionalEddy Vluggen11-Aug-12 0:38 
QuestionCrossing the UI sync context with a datasource Pin
JoeRip8-Aug-12 12:11
JoeRip8-Aug-12 12:11 
Hello -

In one hand, I have a form which contains a DataGridView. Clearly, the DGV is running on the UI thread.

In the other hand, I have an library object, which contains a DataTable. That datatable is updated by an internal System.Threading.Timer (not a form timer). A couple of times a second, a row is added to that table.

Once I set the DataSource of the DataGridView to be the DataTable of that library object, the DGV never redraws. The data is there, it just doesn't draw.

The problem is that the DataTable is being updated by a different thread than the UI thread (verified). Apparently, the "your data has changed" methods of the DGV are also being called on that other thread.

So: how do I avoid this? Since the update mechanisms are private to the DataSource/Binding mechanism, there is no clear place where I can use Invoke to sync the datatable with the UI thread, so I can cross the thread boundary safely.

I do own the library object. I am currently exposing the DataTable as a public object. Is there another way to get the data in the table to the DGV, in a way that crosses the thread boundary safely?
AnswerRe: Crossing the UI sync context with a datasource Pin
Ed Hill _5_8-Aug-12 22:37
Ed Hill _5_8-Aug-12 22:37 
AnswerRe: Crossing the UI sync context with a datasource Pin
Eddy Vluggen8-Aug-12 23:55
professionalEddy Vluggen8-Aug-12 23:55 
GeneralRe: Crossing the UI sync context with a datasource Pin
JoeRip9-Aug-12 11:22
JoeRip9-Aug-12 11:22 
GeneralRe: Crossing the UI sync context with a datasource Pin
Eddy Vluggen9-Aug-12 21:08
professionalEddy Vluggen9-Aug-12 21:08 
AnswerRe: Crossing the UI sync context with a datasource Pin
JoeRip9-Aug-12 10:29
JoeRip9-Aug-12 10:29 
GeneralRe: Crossing the UI sync context with a datasource Pin
Ed Hill _5_9-Aug-12 22:45
Ed Hill _5_9-Aug-12 22:45 
GeneralRe: Crossing the UI sync context with a datasource Pin
Eddy Vluggen9-Aug-12 23:01
professionalEddy Vluggen9-Aug-12 23:01 
GeneralRe: Crossing the UI sync context with a datasource Pin
JoeRip9-Aug-12 23:46
JoeRip9-Aug-12 23:46 
GeneralRe: Crossing the UI sync context with a datasource Pin
JoeRip10-Aug-12 16:16
JoeRip10-Aug-12 16:16 
GeneralRe: Crossing the UI sync context with a datasource Pin
Ed Hill _5_11-Aug-12 6:14
Ed Hill _5_11-Aug-12 6:14 
GeneralRe: Crossing the UI sync context with a datasource Pin
JoeRip10-Aug-12 18:47
JoeRip10-Aug-12 18:47 
QuestionIf proccess is running then start coding ! Help Needed Pin
jitforce25858-Aug-12 8:09
jitforce25858-Aug-12 8:09 
AnswerRe: If proccess is running then start coding ! Help Needed Pin
jitforce25858-Aug-12 8:58
jitforce25858-Aug-12 8:58 
QuestionA Way Capturing Straight the Active Windows Only ?? Pin
jitforce25858-Aug-12 4:30
jitforce25858-Aug-12 4:30 
AnswerRe: A Way Capturing Straight the Active Windows Only ?? Pin
Pete O'Hanlon8-Aug-12 4:48
mvePete O'Hanlon8-Aug-12 4:48 
GeneralRe: A Way Capturing Straight the Active Windows Only ?? Pin
jitforce25858-Aug-12 5:05
jitforce25858-Aug-12 5:05 
GeneralRe: A Way Capturing Straight the Active Windows Only ?? Pin
Pete O'Hanlon8-Aug-12 5:10
mvePete O'Hanlon8-Aug-12 5:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.