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.
You probably making the UI thread busy. You can create the forms in a seperate threads.
I don't know how to create the forms in a separate threads...
As far as I know, there is a UI thread limitation: only the UI thread can control these UI controls.
is there any other way can go?
Could you please give me some examples?
thanks a lot!!
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();
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?
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.
Cool~~
I got it!
thanks for your patient and reply!!
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.