DataRowChangeEventArgs(DataRow, DataRowAction) Costruttore

Definizione

Inizializza una nuova istanza della classe 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)

Parametri

row
DataRow

Oggetto DataRow su cui si sta verificando un'azione.

action
DataRowAction

Uno dei DataRowAction valori.

Esempio

Nell'esempio seguente viene aggiunto un DataRowChangeEventHandler oggetto e la routine per gestire l'evento quando viene modificata una riga.


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

Si applica a

Vedi anche