DataRowChangeEventArgs 类

定义

public ref class DataRowChangeEventArgs : EventArgs
public class DataRowChangeEventArgs : EventArgs
type DataRowChangeEventArgs = class
    inherit EventArgs
Public Class DataRowChangeEventArgs
Inherits EventArgs
继承
DataRowChangeEventArgs

示例

下面的示例添加了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

注解

RowChangedRowChanging OnRowDeleted执行操作OnRowDeleting时, 将发生、、和事件。 DataRowThe RowChanged, RowChanging, OnRowDeleted, and OnRowDeleting events occur when an action is performed on a DataRow.

构造函数

DataRowChangeEventArgs(DataRow, DataRowAction)

初始化 DataRowChangeEventArgs 类的新实例。Initializes a new instance of the DataRowChangeEventArgs class.

属性

Action

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

Row

获取已针对其进行操作的行。Gets the row upon which an action has occurred.

方法

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅