Hi,
I am binding some huge data containing almost half million records, now when the data start binding with the grid, my UI struck or halt for a moment until initialize row and control drawing complete.
I have also uses background worker thread, so that the data binding took place in that thread, but same the case here, UI again halting.
Is there any way that my UI doesn't halt no matter how much records i have
Regards:
iMi
Hi iMi,
You could try using the grid in OnDemand mode with the UltraDataSource component. There's a sample of this in the WinGrid and under the UltraDataSource samples called the "Virtual Mode Sample."
I would strongly advise you against using a Background worker thread with DataBinding. This is extremely complex and dangerous and there is really no way to make this work safely.
There's a long discussion of this here: Work with a dataset bound to a grid on a separate thread - Infragistics Community
Hi Mike,
Well, now i am doing following, before providing the data source to the grid i am doing following two things:
this.ultraGrid1.BeginUpdate();
this.ultraGrid1.SuspendRowSynchronization();
Now the huge data is provided to the grid, and the control start binding with it. My question is on which point i have to resume the row sync and call EndUpdate(). Right now i m doing it in _InitializeRow event, but i am getting some unpredictable behavior, which is _InitializeRow event is not hitting. So is it right to resume it in _InitializeRow event or in some where else?
I'm not sure I understand. There's no point in using these methods before the grid is bound to a datasource. These methods prevent the grid from painting and from responding to notifications from the data source. There's no reason to use these while setting the grid's DataSource. And there is no synch point to switch them off since binding is never actually finished, it's an ongoing process.