We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

What is the use of setting the OptimizeListChangedEvent property in a GridDataBoundGrid?

 

Setting the grid.Binder.OptimizeListChangedEvent to true will greatly increase the performance in most cases of binding a IBindingList datasource (including DataTable) to a GridDataBoundGrid.

When this property is set, the grid listens and responds directly to the IBindingList.ListChanged event instead of CurrencyManager change events. The information provided by the ListChanged event is more specific based on the ListChangedType, and allows the grid to more efficiently respond to the action being signaled. With the CurrencyManager events, sometimes the whole grid might get refreshed instead of maybe only a row passed through the ListChanged event.

If you are inserting/deleting lots of records, the performance gains can be significant (~10 to 20 times quicker).

C#

//indicates whether to use the IBindingList.ListChanged instead of the CurrencyManager change events

this.grid.UseListChangedEvent = this.useOptimizedListChangedEvent;

VB

'indicates whether to use the IBindingList.ListChanged instead of the CurrencyManager change events

Me.grid.UseListChangedEvent = Me.useOptimizedListChangedEvent

Here is the link with both CS and VB samples: http://websamples.syncfusion.com/samples/KB/Grid.Windows/GDBGPerformance/main.htm

Article ID: Published Date: Last Revised Date: Platform: Control:
482 04/30/2011 07/10/2014 Windows Forms GridDataBoundGrid(Classic)
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.