Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
DataRowChangeEventArgs Constructor
Collapse the table of content
Expand the table of content

DataRowChangeEventArgs Constructor

Initializes a new instance of the DataRowChangeEventArgs class.

[Visual Basic]
Public Sub New( _
   ByVal row As DataRow, _
   ByVal action As DataRowAction _
)
[C#]
public DataRowChangeEventArgs(
   DataRow row,
 DataRowAction action
);
[C++]
public: DataRowChangeEventArgs(
   DataRow* row,
 DataRowAction action
);
[JScript]
public function DataRowChangeEventArgs(
   row : DataRow,
 action : DataRowAction
);

Parameters

row
The DataRow upon which an action is occuring.
action
One of the DataRowAction values.

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

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

See Also

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

Show:
© 2015 Microsoft