DataRowChangeEventArgs(DataRow, DataRowAction) DataRowChangeEventArgs(DataRow, DataRowAction) DataRowChangeEventArgs(DataRow, DataRowAction) DataRowChangeEventArgs(DataRow, DataRowAction) Constructor

定義

DataRowChangeEventArgs クラスの新しいインスタンスを初期化します。Initializes a new instance of the DataRowChangeEventArgs class.

public:
 DataRowChangeEventArgs(System::Data::DataRow ^ row, System::Data::DataRowAction action);
public DataRowChangeEventArgs (System.Data.DataRow row, System.Data.DataRowAction action);
new System.Data.DataRowChangeEventArgs : System.Data.DataRow * System.Data.DataRowAction -> System.Data.DataRowChangeEventArgs
Public Sub New (row As DataRow, action As DataRowAction)

パラメーター

row
DataRow DataRow DataRow DataRow

アクションを実行する DataRowThe DataRow upon which an action is occurring.

action
DataRowAction DataRowAction DataRowAction DataRowAction

DataRowAction 値のいずれか 1 つ。One of the DataRowAction values.

次の例ではDataRowChangeEventHandler 、行が変更されたときにイベントを処理するとプロシージャを追加します。The following example adds a DataRowChangeEventHandler and the procedure to handle the event when a row is changed.


Private dataTable As DataTable

Private Sub [AddHandler]()
   dataTable = CType(DataGrid1.DataSource, DataTable)
   AddHandler dataTable.RowChanged, AddressOf Me.dataTable_Changed
End Sub

Private Sub dataTable_Changed _
(ByVal sender As System.Object, ByVal e As System.Data.DataRowChangeEventArgs)
   Console.WriteLine("Row Changed", e.Action, e.Row.Item(DataGrid1.CurrentCell.ColumnNumber))
End Sub

適用対象

こちらもご覧ください