UpdateControls Method (BindingCollection Object)

       

Gets the current row from the BindingCollection object's data source and resets the contents of controls bound through the object.

Syntax

object.UpdateControls

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

Use this method to restore the contents of bound controls to their original values, as when a user makes changes to data and then decides to cancel the changes.

Calling UpdateControls has the same effect as resetting the DataChanged property on each Binding object to False, then making the current row current again, with the exception that no events occur when calling UpdateControls. By not invoking any events, this method can be used to simplify an update operation because no additional validation or change event procedures are triggered.