共用方式為


BindingManagerBase.ResumeBinding 方法

定義

當在衍生類別中覆寫時,繼續資料繫結 (Data Binding)。

public:
 abstract void ResumeBinding();
public abstract void ResumeBinding ();
abstract member ResumeBinding : unit -> unit
Public MustOverride Sub ResumeBinding ()

範例

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=BindingContext [myDataSet, "Customers"];
      myBindingManager2.ResumeBinding();
   }
   catch(Exception ex)
   {
      MessageBox.Show(ex.Source);
      MessageBox.Show(ex.Message);
   }
}
Private Sub button4_Click(sender As Object, e As EventArgs)
   Try
      Dim myBindingManager2 As BindingManagerBase = BindingContext(myDataSet, "Customers")
      myBindingManager2.ResumeBinding()
   Catch ex As Exception
      MessageBox.Show(ex.Source.ToString())
      MessageBox.Show(ex.Message.ToString())
   End Try
End Sub

備註

SuspendBindingResumeBinding 是兩種方法,允許暫止和繼續資料系結。 如果使用者必須在驗證發生之前編輯資料欄位,您通常會暫停資料系結。 例如,使用者可能需要根據第二個欄位變更欄位;否則,驗證第一個欄位會導致第二個欄位發生錯誤。

適用於

另請參閱