RowDeleting
DataRowChangeEventHandler RowDeleting;
The RowDeleting
event is raised when a row is
about to be deleted from the table.
The following code demonstrates how to handle the
RowDeleting
event:
DataTable dt = new DataTable(); dt.RowDeleting += new DataRowChangeEventHandler(dt_RowDeleting); private void dt_RowDeleting(object sender, DataRowChangeEventArgs e) { MessageBox.Show("RowDeleting: Action = " + e.Action + "; " + "Row Id = " + e.Row["Id"].ToString()); }
The event handler receives an argument of type
DataRowChangeEventArgs
, which contains properties
that provide specific information about the event as described
in
Table 23-14.