語言

DataRowChangeEventArgs.Action 屬性

定義

取得在 上 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 價值。

範例

以下範例新增了 a DataRowChangeEventHandler 和處理當列變更事件的程序。


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

適用於

另請參閱