Export (0) Print
Expand All

DataRowChangeEventArgs Class

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

For a list of all members of this type, see DataRowChangeEventArgs Members.

System.Object
   System.EventArgs
      System.Data.DataRowChangeEventArgs

[Visual Basic]
Public Class DataRowChangeEventArgs
   Inherits EventArgs
[C#]
public class DataRowChangeEventArgs : EventArgs
[C++]
public __gc class DataRowChangeEventArgs : public EventArgs
[JScript]
public class DataRowChangeEventArgs extends EventArgs

Thread Safety

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

Remarks

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

Example

[Visual Basic] The following example adds a DataRowChangeEventHandler and the procedure to handle the event when a row is changed.

[Visual Basic] 

 Private myTable As DataTable
 
 Private Sub [AddHandler]()
    myTable = CType(datagrid1.DataSource, DataTable)
    AddHandler myTable.RowChanged, AddressOf Me.myDataTable_Changed
 End Sub
 
 Private Sub myDataTable_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

[C#, C++, JScript] No example is available for C#, C++, or JScript. To view a Visual Basic example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Namespace: System.Data

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

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

See Also

DataRowChangeEventArgs Members | System.Data Namespace | OnRowChanged | OnRowChanging | OnRowDeleting | DataRow | DataRowAction | DataRowChangeEventHandler | OnRowDeleted | DataTable

Show:
© 2014 Microsoft