System.Windows.Forms.BindingSource.ResetBindings Method

Causes a control bound to the System.Windows.Forms.BindingSource to reread all the items in the list and refresh their displayed values.

Syntax

public void ResetBindings (bool metadataChanged)

Parameters

metadataChanged
true if the data schema has changed; false if only values have changed.

Remarks

The BindingSource.ResetBindings(bool) method informs all controls bound to the System.Windows.Forms.BindingSource to refresh their values. The method does this by raising the BindingSource.ListChanged event at least once; the metaDataChanged parameter indicates the nature of the underlying change.

Regardless of the value of metaDataChanged, a BindingSource.ListChanged event is raised with System.ComponentModel.ListChangedEventArgs.ListChangedType set to System.ComponentModel.ListChangedType.Reset. As a consequence, calling BindingSource.ResetBindings(bool) with a parameter of true will raise two BindingSource.ListChanged events.

BindingSource.ResetBindings(bool) is automatically called whenever another member makes major changes to the data-binding, such as setting the BindingSource.DataSource or BindingSource.DataMember properties. However, the programmer can also call this method explicitly.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0