DataRowChangeEventArgs(DataRow, DataRowAction) Konstruktor

Definicja

Inicjuje nowe wystąpienie klasy DataRowChangeEventArgs.

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)

Parametry

row
DataRow

Na DataRow którym występuje akcja.

action
DataRowAction

Jedna z DataRowAction wartości.

Przykłady

Poniższy przykład dodaje procedurę DataRowChangeEventHandler i do obsługi zdarzenia po zmianie wiersza.


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

Dotyczy

Zobacz też