CurrencyManager.ResumeBinding メソッド
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)


SuspendBinding と ResumeBinding は、単純データ バインディングにおいて、一時的な中断と再開を可能にする 2 つのメソッドです。通常、検証が発生する前にユーザーにデータ フィールドの編集を許可する必要がある場合は、データ連結を中断します。たとえば、最初のフィールドを 2 番目のフィールドに従って変更する必要がある場合は、最初のフィールドが検証された時点で 2 番目のフィールドのエラーが発生します。
![]() |
---|
SuspendBinding を使用すると、ResumeBinding が呼び出されるまでデータ ソースに変更が反映されませんが、データ ソースの変更によるバインド コントロールへの影響が抑制されることはありません。DataGridView コントロールなど、複合データ バインディングを使用するコントロールでは、ListChanged イベントなどの変更イベントに基づいて値が更新されます。このメソッドを呼び出しても、これらのイベントの発生は抑制されません。したがって、SuspendBinding および ResumeBinding は、TextBox など単純バインド コントロールで使用する目的で設計されています。ただし、RaiseListChangedEvents プロパティを false に設定して、ListChanged イベントの発生を中断している場合は、これらのメソッドを複合バインディングで使用できます。 |

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 'button4_Click
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); } }
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 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
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からCurrencyManager.ResumeBinding メソッドを検索する場合は、下記のリンクをクリックしてください。

- CurrencyManager.ResumeBinding メソッドのページへのリンク