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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Platform: WinForms |
Control: GridDataBoundGrid(Classic) |
Published Date: April 30, 2011 |
Last Revised Date: July 10, 2014

 

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

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon 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.Close Icon