Hi, I have a large dataset, with many tables in binding with wingrid, there are 4 visible bands, other bands are hidden. When I do to clear the dataset, the time of clear instruction is 3,5 seconds, and I've see the the cause is binding with grid. There is a way to improve preformace in this scenario?
thank you very much.
Andrea
Andrea,
This behavior is well-known. Unfortunately, IG does not provide a way to truly suspend synchronization on the grid to let you call Clear() on your DataSet. I tried with Begin/EndUpdate(), Suspend/ResumeLayout() and Suspend/ResumeRowSynchronization() with no success (though the latter sounded promising on paper).
The best solution I found and that is widely recommended for the .Net DataGrid also is to introduce a BindingSource between your actual data source (DataSet, DataTable, DataView, etc.) and the DataSource property of the WinGrid.
Basically, instead of:
...ultraGrid1.DataSource = myDataSet.Table["TableName"];...
You would do this:
...BindingSource myBindingSource = new BindingSource();myBindingSource.DataSource = myDataSet.Table["TableName"];ultraGrid1.DataSource = myBindingSource;...
Most, if not all your code should work as-is, unless you were doing 'not recommended' direct interactions with the data source.
Hope this helps.
Regards,
Eric.