DataRowChangeEventArgs(DataRow, DataRowAction) Constructeur
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Initialise une nouvelle instance de la 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)
Paramètres
- action
- DataRowAction
Une des DataRowAction valeurs.
Exemples
L’exemple suivant ajoute une procédure et une DataRowChangeEventHandler procédure pour gérer l’événement lorsqu’une ligne est modifiée.
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