Export (0) Print
Expand All

Binding.BindingManagerBase Property

Gets the BindingManagerBase for this Binding.

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

public BindingManagerBase BindingManagerBase { get; }
/** @property */
public BindingManagerBase get_BindingManagerBase ()

public function get BindingManagerBase () : BindingManagerBase

Property Value

The BindingManagerBase that manages this Binding.

Use the BindingManagerBase to iterate through a data-bound list by incrementing or decrementing the Position property. The BindingManagerBase class is abstract. The CurrencyManager class, which manages data-bound lists, inherits from the BindingManagerBase class.

The following code example gets the BindingManagerBase of every Binding on the form, and prints the Position property for each BindingManagerBase.

private void PrintPositions()
{
   foreach(Control c in this.Controls)
   {
      foreach(Binding xBinding in c.DataBindings)
      {
         Console.WriteLine
         (c.ToString() + "\t Position: " + 
         xBinding.BindingManagerBase.Position);
      }
   }
}


private void PrintPositions()
{
    for (int iCtr1 = 0; iCtr1 < this.get_Controls().get_Count(); iCtr1++) {
        Control c = this.get_Controls().get_Item(iCtr1);
        for (int iCtr2 = 0; iCtr2 < c.get_DataBindings().get_Count(); 
            iCtr2++) {
            Binding xBinding = c.get_DataBindings().get_Item(iCtr2);
            Console.WriteLine((c.ToString() + "\t Position: "
                + xBinding.get_BindingManagerBase().get_Position()));
        }
    }
} //PrintPositions

private function PrintPositions()
{
   for(var i : int = 0; i < this.Controls.Count; i ++)
   {
      for(var j : int = 0; j < this.Controls[i].DataBindings.Count; j++)
      {
         Console.WriteLine
         (this.Controls[i].ToString() + "\t Position: " + 
         this.Controls[i].DataBindings[j].BindingManagerBase.Position);
      }
   }
}


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

ADD
Show:
© 2014 Microsoft