Articles in this section
Category / Section

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

4 mins read

 

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

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied