Reputation: 1581
I have a ultragrid which is bound to a datatable, i update datatable in a thread (not a gui thread). My question is that while updating datatable do I need to delegate it on gui thread (so that update on grid happens in gui thread) or I can simply update datatable in any thread and infragistics grid takes care of updating itself in correct thread?
I couldn't find answer to simple question in infragistics online help or docs.
thanks
Upvotes: 0
Views: 4026
Reputation: 72
best way i found to do this was to use a synchronizationContext object to post the .add call to the GUI thread.
in my situation i have classes with a property of type synchronizationContext that i set to SynchronizationContext.Current when the class is initialized. then i can call something like:
SyncContext.Post(Sub() _displaySource.Rows.Add(r) End Sub, Nothing)
when the class is running on a different thread and it works fine. without this you will get the annoying red X occasionally
Upvotes: 1