DataRowChangeEventArgs Class

 

Provides data for the RowChanged, RowChanging, OnRowDeleting, and OnRowDeleted events.

Namespace:   System.Data
Assembly:  System.Data (in System.Data.dll)

System::Object
  System::EventArgs
    System.Data::DataRowChangeEventArgs

public ref class DataRowChangeEventArgs : EventArgs

NameDescription
System_CAPS_pubmethodDataRowChangeEventArgs(DataRow^, DataRowAction)

Initializes a new instance of the DataRowChangeEventArgs class.

NameDescription
System_CAPS_pubpropertyAction

Gets the action that has occurred on a DataRow.

System_CAPS_pubpropertyRow

Gets the row upon which an action has occurred.

NameDescription
System_CAPS_pubmethodEquals(Object^)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The RowChanged, RowChanging, OnRowDeleted, and OnRowDeleting events occur when an action is performed on a DataRow.

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

.NET Framework
Available since 1.1

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: