Describes the current state of a DataRow.
[Visual Basic] Public Enum DataRowState [C#] public enum DataRowState [C++] public enum DataRowState
[JScript] In JScript, you can use the enumerations in the NGWS frameworks, but you cannot define your own.
DataRowState values are used when getting the DataRow class's TBD property.
Use the members of this enumeration to determine the state of a DataRow in a DataTable.
The table below lists each of these states:
Item | Description |
---|---|
Detached | The DataRow does not belong to any DataTable object's RowsCollection. |
Unchanged | No changes have been made to the DataRow. since the last time either the TBD or TBD method was called. |
New | The DataRow is new. |
Deleted | The DataRow has been deleted from the DataTable. |
Modified | The DataRow has been modified. |
Member Name | Description |
---|---|
Deleted | The row was deleted after AcceptChanges was last called. |
Detached | The row has been created, but does not belong to a table. |
Modified | The row was modified after AcceptChanges was last called. |
New | The row was added after AcceptChanges was last called. |
Unchanged | The row has not changed since AcceptChanges was last called. |
Namespace: System.Data
Assembly: System.Data.dll
The following example adds a DataRowChangeEventHandler and the procedure to handle the event when a row is changed. The DataRowState is printed whenever a row changes.
[Visual Basic]
Private myTable As DataTable Private Sub AddHandler() Set myTable = datagrid1.DataGridTable.DataTable myTable.AddOnRowChanged New System.Data.DataRowChangeEventHandler(AddressOf Me.myDataTable_Changed) End Sub Private Sub myDataTable_Changed(ByVal sender As System.Object, ByVal e As System.Data.DataRowChangeEventArgs) Debug.Print "Row Changed", e.Action, e.Row.Item(datagrid1.CurrentCell.ColumnNumber) End Sub
System.Data Namespace | TBD | TBD | BeginEdit | DataRowChangeEventArgs | DataRowChangeEventHandler | RowState