BindingManagerBase.CurrentChanged イベント
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Public Event CurrentChanged As EventHandler
Dim instance As BindingManagerBase Dim handler As EventHandler AddHandler instance.CurrentChanged, handler
public event EventHandler CurrentChanged
public: event EventHandler^ CurrentChanged { void add (EventHandler^ value); void remove (EventHandler^ value); }
/** @event */ public void add_CurrentChanged (EventHandler value) /** @event */ public void remove_CurrentChanged (EventHandler value)


CurrentChanged イベントで BindingManagerBase の Current オブジェクトの値を出力するコード例を次に示します。この例では、データ ソースが CustName という名前の DataColumn がある DataTable であることを前提にしています。
Private Sub Current_Changed(sender As Object, e As EventArgs) Dim bm As BindingManagerBase = CType(sender, BindingManagerBase) ' Check the type of the Current object. If it is not a ' DataRowView, exit the method. If Not bm.Current.GetType() Is GetType(DataRowView) Then Return End If ' Otherwise, print the value of the column named "CustName". Dim drv As DataRowView = CType(bm.Current, DataRowView) Console.Write("CurrentChanged): ") Console.Write(drv("CustName")) Console.WriteLine() End Sub 'Current_Changed
private void Current_Changed(object sender, EventArgs e) { BindingManagerBase bm = (BindingManagerBase) sender; /* Check the type of the Current object. If it is not a DataRowView, exit the method. */ if(bm.Current.GetType() != typeof(DataRowView)) return; // Otherwise, print the value of the column named "CustName". DataRowView drv = (DataRowView) bm.Current; Console.Write("CurrentChanged): "); Console.Write(drv["CustName"]); Console.WriteLine(); }
void Current_Changed( Object^ sender, EventArgs^ /*e*/ ) { BindingManagerBase^ bm = dynamic_cast<BindingManagerBase^>(sender); /* Check the type of the Current object. If it is not a DataRowView, exit the method. */ if ( bm->Current->GetType() != DataRowView::typeid ) return; // Otherwise, print the value of the column named "CustName". DataRowView^ drv = dynamic_cast<DataRowView^>(bm->Current); Console::Write( "CurrentChanged): " ); Console::Write( drv[ "CustName" ] ); Console::WriteLine(); }
private void Current_Changed(Object sender, EventArgs e) { BindingManagerBase bm = (BindingManagerBase)sender; /* Check the type of the Current object. If it is not a DataRowView, exit the method. */ if (!bm.get_Current().GetType().Equals(DataRowView.class.ToType())) { return; } // Otherwise, print the value of the column named "CustName". DataRowView drv = (DataRowView)(bm.get_Current()); Console.Write("CurrentChanged): "); Console.Write(drv.get_Item("CustName")); Console.WriteLine(); } //Current_Changed

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に収録されているすべての辞書からBindingManagerBase.CurrentChanged イベントを検索する場合は、下記のリンクをクリックしてください。

- BindingManagerBase.CurrentChanged イベントのページへのリンク