Export (0) Print
Expand All

BindingContext.Item Property (Object)

Gets the BindingManagerBase that is associated with the specified data source.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public BindingManagerBase this [
	Object dataSource
] { get; }
/** @property */
public BindingManagerBase get_Item (Object dataSource)

JScript supports the use of indexed properties, but not the declaration of new ones.



The data source associated with a particular BindingManagerBase.

Property Value

A BindingManagerBase for the specified data source.

Use this overload if the BindingManagerBase you want does not require a navigation path. For example, if the BindingManagerBase manages a set of Binding objects that use an ArrayList or DataTable as the DataSource, no navigation path is required.


The Item property will always return a BindingManagerBase, and never return a null reference (Nothing in Visual Basic).

See the Binding class for a list of possible data sources and for information about creating bindings between controls and data sources.

The following code example returns three BindingManagerBase objects: one for a DataView, one for an ArrayList, and one for the DataSource of a Binding that belongs to a TextBox control.

private void ReturnBindingManagerBase()
   // Get the BindingManagerBase for a DataView. 
   BindingManagerBase bmCustomers = 
   this.BindingContext [myDataView];

   /* Get the BindingManagerBase for an ArrayList. */ 
   BindingManagerBase bmOrders = 

   // Get the BindingManagerBase for a TextBox control.
   BindingManagerBase baseArray = 

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

Community Additions

© 2015 Microsoft