DataRowChangeEventArgs.Action 属性

定义

获取针对 DataRow 进行的操作。Gets the action that has occurred on a DataRow.

public:
 property System::Data::DataRowAction Action { System::Data::DataRowAction get(); };
public System.Data.DataRowAction Action { get; }
member this.Action : System.Data.DataRowAction
Public ReadOnly Property Action As DataRowAction

属性值

DataRowAction

DataRowAction 值之一。One of the DataRowAction values.

示例

下面的示例添加了一个 DataRowChangeEventHandler 和一个过程,用于在行发生更改时处理事件。The following example adds a DataRowChangeEventHandler and the procedure to handle the event when a row is changed.


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

适用于

另请参阅