I have a user control that contain a bound datagridview and a collection to load data in binding source.
When I want to load control first time from another form the BindingSource.CurrentChanged method being called 3 times! but when I click next button to see next object on loaded datagridview control, BindingSource.CurrentChanged being called only once.
Can someone please explain why CurrentChanged method is being called 3 times in first time but only once when the control is already loaded?
CurrentChanged event is raised whenever the Current property changes for any of the following reasons:
The current position of the List changes.
The DataSource or DataMember properties change.
The membership of the underlying List changes, which causes Position to refer to a different item. Examples include adding or deleting an item before the current item, deleting or moving the current item itself, or moving an item to the current position.
The underlying list is refreshed by a new sorting or filtering operation.
For more information refer to https://social.msdn.microsoft.com/Forums/windows/en-US/5f968c71-a979-4e80-9896-94736e832f0c/bindingsource-currentchanged-event?forum=winformsdatacontrols page.