DataRowChangeEventArgs(DataRow, DataRowAction) Constructeur

Définition

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

row
DataRow

Sur DataRow lequel une action se produit.

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

S’applique à

Voir aussi