Question

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

Was it helpful?

Solution

You need to update the data source on the UI thread. There are some similar discussions on the Infragistics forums, for example: one, two, three.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top