ControlBindingsCollection.Clear Method ()

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Clears the collection of any bindings.

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

public void Clear()

The CollectionChanged event occurs when the collection is cleared.

The following code example uses the Clear method to clear the ControlBindingsCollection for each control on a form.

private void ClearAllBindings()
{
   foreach(Control c in groupBox1.Controls)
   c.DataBindings.Clear();
}

.NET Framework
Available since 1.1
Return to top
Show: