Performance tip for databound UI
When loading large amounts of data into a dataset table with databound UI, things can get pretty slow. One reason is that each time a row is added to the table, the databinding components will perform some work and tell the databound controls that a new record was added. To improve performance, you can suspend the binding events while the data is being loaded. The BindingSource component has a RaiseListChangedEvents property for that purpose. Here's an example how to use it:
AddressBindingSource.RaiseListChangedEvents = False
AddressTableAdapter.Fill(AdventureWorksDataSet.Address)
AddressBindingSource.RaiseListChangedEvents = True
AddressBindingSource.ResetBindings(False);
Another option is to disconnect the BindingSource component while the Fill is being executed by setting its DataSource property to Nothing and reconnect it after Fill has completed.
HTH
Antoine
Visual Studio Data Design-time
Comments
Anonymous
September 22, 2005
Is it in Visual Studio 2005 beta2 ?Anonymous
September 26, 2005
The comment has been removedAnonymous
October 01, 2005
The comment has been removedAnonymous
June 01, 2009
PingBack from http://woodtvstand.info/story.php?id=2960Anonymous
June 18, 2009
PingBack from http://cutebirdbaths.info/story.php?id=1955