Manages all Binding objects that are bound to the same data source and data member. This class is abstract.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Gets the collection of bindings being managed.
When overridden in a derived class, gets the number of rows managed by the.
When overridden in a derived class, gets the current object.
Gets a value indicating whether binding is suspended.
When overridden in a derived class, gets or sets the position in the underlying list that controls bound to this data source point to.
When overridden in a derived class, adds a new item to the underlying list.
When overridden in a derived class, cancels the current edit.
When overridden in a derived class, ends the current edit.
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Serves as the default hash function. (Inherited from Object.)
When overridden in a derived class, gets the collection of property descriptors for the binding.
Gets the collection of property descriptors for the binding using the specified ArrayList.
|GetItemProperties(Type, Int32, ArrayList, ArrayList)|
Gets the list of properties of the items managed by this.
When overridden in a derived class, gets the name of the list supplying the data for the binding.
Raises the BindingComplete event.
Raises the CurrentChanged event.
Raises the CurrentItemChanged event.
Raises the DataError event.
Pulls data from the data-bound control into the data source, returning no information.
Pushes data from the data source into the data-bound control, returning no information.
When overridden in a derived class, deletes the row at the specified index from the underlying list.
When overridden in a derived class, resumes data binding.
When overridden in a derived class, suspends data binding.
Returns a string that represents the current object.(Inherited from Object.)
When overridden in a derived class, updates the binding.
Occurs at the completion of a data-binding operation.
Occurs when the currently bound item changes.
Occurs when the state of the currently bound item changes.
Occurs when an Exception is silently handled by the .
Occurs after the value of the Position property has changed.
The Binding class.) For example, suppose that a form contains two TextBox controls that are bound to the same data source but to different columns. The data source might be a DataTable that contains customer names, while the columns might contain the first and last names. The two controls must be synchronized in order to display the correct first and last names together for the same customer. The CurrencyManager, which inherits from the class, accomplishes this synchronization by maintaining a pointer to the current item in the data source. The TextBox controls are bound to the current item so they display the information for the same row. When the current item changes, the CurrencyManager notifies all the bound controls so that they can refresh their data. Furthermore, you can set the Position property to specify the row in the DataTable that the controls point to. To determine how many rows exist in the data source, use the Count property.enables the synchronization of data-bound controls on a Windows Form that are bound to the same data source. (For more information about simple binding a control to a data source, see the
The CurrencyManager is necessary because data sources do not necessarily maintain a current-item pointer. For instance, arrays and ArrayList objects can be data sources, but they do not have a property that returns the current item. To get the current item, use the Current property.
The PropertyManager also inherits from the , and it is used to maintain the current property of an object, rather than the property of a current object in a data source. For this reason, trying to set the Position or Count property for a PropertyManager has no effect.
Solutions programmers are encouraged to bind controls directly to a BindingSource component, which acts as both a data source and data connector to the actual target data source. BindingSource greatly simplifies both simple and complex data binding, including managing currency between the control and its target.
Notes to Inheritors:
The following code example uses the BindingContext to return a for a specific data source. (The example assumes you have declared myBindingManagerBase in the Declarations section of the module.) The example then adds event delegates to the CurrentChanged and PositionChanged events. Lastly, the example contains four methods (MoveNext, MovePrevious, MoveFirst, and MoveLast) that increment or decrement the Position property, and set the Position to the first or last row in the list. The last row in the list is determined by using the Count property.
Available since 1.1
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.