This documentation is archived and is not being maintained.

CurrencyManager.Position Property

Gets or sets the position you are at within the list.

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

abstract Position : int with get, set
override Position : int with get, set

Property Value

Type: System.Int32
A number between 0 and Count minus 1.

An important property of the CurrencyManager class is the Position property. In a list of items, you can view only one item out of the entire list. To determine which item is viewed, set the Position to a number between 0 (the beginning of the list) and Count minus 1 (the end of the list).

Therefore, the Position determines the currency, or place in the list, of all controls bound to the same CurrencyManager. For example, imagine a list consisting of two columns called "FirstName" and "LastName". Two TextBox controls are bound to the same list; the first control is bound to the first column, and the second control is bound to the second column. When the Position of the common CurrencyManager is set to the third position, both controls display the appropriate values for that position in the list. In other words, if the item at position three consists of the first name "John" and the last name "Smith", the bound controls will display "John" and "Smith".

The following code examples use the Position property to allow navigation through a list.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.