共用方式為


DataRowChangeEventArgs.Row 屬性

定義

取得動作已經發生的所在資料列。

public:
 property System::Data::DataRow ^ Row { System::Data::DataRow ^ get(); };
public System.Data.DataRow Row { get; }
member this.Row : System.Data.DataRow
Public ReadOnly Property Row As DataRow

屬性值

動作已經發生的所在 DataRow

範例

下列範例會新增 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

適用於

另請參閱