Welcome to MSDN Blogs Sign in | Join | Help

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

Published Monday, September 19, 2005 11:01 PM by SmartClientData

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Performance tip for databound UI

Friday, September 23, 2005 3:31 AM by Ricky
Is it in Visual Studio 2005 beta2 ?

# re: Performance tip for databound UI

Monday, September 26, 2005 11:27 PM by SD
Hey Steve, I was looking for some clips of the crank call show, which i used to watch on public access and came across that you worked on it. any chance of posting or sendimnd me some clips? thanks.

# re: Performance tip for databound UI

Saturday, October 01, 2005 10:14 AM by SmartClientData
Wow, that's a blast from the past. The Crank Call Show was way back in my high school days. In fact, most of the shows were in black & white as the budget was really tight just to remember how long ago that was :). Unfortunately I didn’t have the foresight to save any of the tapes. I don’t even remember if we recorded any of the live broadcasts as that was extra $5. If you do find any of the shows, please let me know. We had a lot of fun with early live cable TV. Anybody remember the Robyn Bird Show, the A Play, Tele-Psychic w/Morris Fonte? These were just a few of the shows I worked on with some great people.

Steve

# Smart Client Data Performance tip for databound UI | Wood TV Stand

# Smart Client Data Performance tip for databound UI | bird baths

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker