Hi,
I have two forms opened at the same time and both forms have a grid on it.
the formA have gridA bound to winDataSourceA, and the formB have gridB bound to winDataSouceB.
the winDataSourceA and winDataSourceB have about 2000 rows.
the gridA with winDataSourceA have to update data frequently, about 250 times a second.
its performance is perfect.
but when I scroll the scrollbar on gridB quickly, I found that gridA stop updating until I stop scrolling.
when I stop scrolling the gridB, the value of gridA jumps to the correct value and resumes update.
Could you please give me some suggestions about this situation?
in my system, the gridA needs update value immediately.
Thanks a lot.
As long as the two grids and the two data source are not working on the same data, then it should be safe to display them using different threads.
If any of the data is related in some way, though, you could run into problems.
Cool~~
I got it!
thanks for your patient and reply!!
Mike's right ofcourse, but if you open FormA in another thread than the main form thread, and update the data in this thread, you get no error.
I can't see how GridA can update 250 times a second when you keep the same thread busy with scrolling.
I have no problem about opening FormA,
the FormA is opened already, and I need to do is updating the data in GridA in FormA.
the update action, like dataTable0][0] = "AA", can be put in this non-UI thread?
( this datatable is bound to the gridA)
Mike Saltzman told me that "You should never update a bound data source on a thread other than the UI thread. There is no safe way to do that." in this reply http://community.infragistics.com/forums/t/39788.aspx
In fact, even I update the data in gridA 250 times a second, the gridA performs perfectly!
I doubt that the problem is about scrolling...
Could you please give me some suggestions about this scrolling performance issue?
Can I suspend from painting until I stop scrolling, or re-paint less frequency when I scrolling?
Or I think wrong way about this situation?
Suppose you have a method named "OpenFormA" that opens from A, Loads the data and refresh it.
Open form B as you did until now, but in order to open form A write this:
Thread t = new Thread(OpenFormA)
t.Start();