System.Windows.Forms.CurrencyManager Class

Manages a list of System.Windows.Forms.Binding objects.

See Also: CurrencyManager Members

Syntax

public class CurrencyManager : BindingManagerBase

Remarks

The System.Windows.Forms.CurrencyManager derives from the System.Windows.Forms.BindingManagerBase class. Use the System.Windows.Forms.BindingContext to return either a System.Windows.Forms.CurrencyManager or a System.Windows.Forms.PropertyManager. The actual object returned depends on the data source and data member passed to the BindingContext.Item(object) property of the System.Windows.Forms.BindingContext. If the data source is an object that can return only a single property (instead of a list of objects), the type will be a System.Windows.Forms.PropertyManager. For example, if you specify a System.Windows.Forms.TextBox as the data source, a System.Windows.Forms.PropertyManager will be returned. If, on the other hand, the data source is an object that implements the IList, System.ComponentModel.IListSource, or System.ComponentModel.IBindingList interface, a System.Windows.Forms.CurrencyManager will be returned.

The BindingManagerBase.Current property returns the current item in the underlying list. To change the current item, set the BindingManagerBase.Position property to a new value. The value must be greater than 0 and must be less than the value of the BindingManagerBase.Count property.

If the underlying data source implements the System.ComponentModel.IBindingList interface, and the System.ComponentModel.IBindingList.AllowNew property is set to true, you can use the CurrencyManager.AddNew method.

Requirements

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