Export (0) Print
Expand All

BindingManagerBase.ResumeBinding Method

When overridden in a derived class, resumes data binding.

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

public abstract void ResumeBinding ()
public abstract void ResumeBinding ()
public abstract function ResumeBinding ()
Not applicable.

SuspendBinding and ResumeBinding are two methods that allow the temporary suspension and resumption of data binding. You would typically suspend data binding if the user must be allowed to edit data fields before validation occurs. For example, the user might need to change a field to be in accordance with a second field; otherwise, validating the first field would cause the second field to be in error.

private void button4_Click(object sender, EventArgs e)
{
   try
   {
      BindingManagerBase myBindingManager2=BindingContext [myDataSet, "Customers"];
      myBindingManager2.ResumeBinding();
   }
   catch(Exception ex)
   {
      MessageBox.Show(ex.Source);
      MessageBox.Show(ex.Message);
   }
}

private void button4_Click(Object sender, EventArgs e)
{
    try {
        BindingManagerBase myBindingManager2 = 
            get_BindingContext().get_Item(myDataSet, "Customers");
        myBindingManager2.ResumeBinding();
    }
    catch (System.Exception ex) {
        MessageBox.Show(ex.get_Source());
        MessageBox.Show(ex.get_Message());
    }
} //button4_Click

Windows 98, Windows Server 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 Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2014 Microsoft