System.Data Namespace
Represents a row of data in a DataTable.
Visibility |
Name |
Parameters |
Return Type |
public |
AcceptChanges |
( )
|
Void
|
public |
BeginEdit |
( )
|
Void
|
public |
CancelEdit |
( )
|
Void
|
public |
ClearErrors |
( )
|
Void
|
public |
Delete |
( )
|
Void
|
public |
EndEdit |
( )
|
Void
|
public |
GetChildRows |
(
String
relationName
,
DataRowVersion
version
)
|
DataRow
|
public |
GetChildRows |
(
String
relationName
)
|
DataRow
|
public |
GetChildRows |
(
DataRelation
relation
)
|
DataRow
|
public |
GetChildRows |
(
DataRelation
relation
,
DataRowVersion
version
)
|
DataRow
|
public |
GetColumnError |
(
Int32
columnIndex
)
|
String
|
public |
GetColumnError |
(
String
columnName
)
|
String
|
public |
GetColumnError |
(
DataColumn
column
)
|
String
|
public |
GetColumnsInError |
( )
|
DataColumn
|
public |
GetParentRow |
(
String
relationName
,
DataRowVersion
version
)
|
DataRow
|
public |
GetParentRow |
(
DataRelation
relation
,
DataRowVersion
version
)
|
DataRow
|
public |
GetParentRow |
(
DataRelation
relation
)
|
DataRow
|
public |
GetParentRow |
(
String
relationName
)
|
DataRow
|
public |
GetParentRows |
(
String
relationName
)
|
DataRow
|
public |
GetParentRows |
(
String
relationName
,
DataRowVersion
version
)
|
DataRow
|
public |
GetParentRows |
(
DataRelation
relation
,
DataRowVersion
version
)
|
DataRow
|
public |
GetParentRows |
(
DataRelation
relation
)
|
DataRow
|
public |
HasVersion |
(
DataRowVersion
version
)
|
Boolean
|
public |
IsNull |
(
String
columnName
)
|
Boolean
|
public |
IsNull |
(
DataColumn
column
)
|
Boolean
|
public |
IsNull |
(
DataColumn
column
,
DataRowVersion
version
)
|
Boolean
|
public |
IsNull |
(
Int32
columnIndex
)
|
Boolean
|
public |
RejectChanges |
( )
|
Void
|
public |
SetAdded |
( )
|
Void
|
public |
SetColumnError |
(
String
columnName
,
String
error
)
|
Void
|
public |
SetColumnError |
(
Int32
columnIndex
,
String
error
)
|
Void
|
public |
SetColumnError |
(
DataColumn
column
,
String
error
)
|
Void
|
public |
SetModified |
( )
|
Void
|
protected |
SetNull |
(
DataColumn
column
)
|
Void
|
public |
SetParentRow |
(
DataRow
parentRow
)
|
Void
|
public |
SetParentRow |
(
DataRow
parentRow
,
DataRelation
relation
)
|
Void
|
|
The DataRow and DataColumn objects are primary components of a DataTable. Use the DataRow object and its properties and methods to retrieve and evaluate; and insert, delete, and update the values in the DataTable. The DataRowCollection represents the actual DataRow objects in the DataTable, and the DataColumnCollection contains the DataColumn objects that describe the schema of the DataTable. Use the overloaded Item property ( DataRow indexer ) to return or sets the value of a DataColumn.
Use the HasVersion and IsNull properties to determine the status of a particular row value, and the RowState property to determine the state of the row in relation to its parent DataTable.
To create a new DataRow, use the NewRow method of the DataTable object. After creating a new DataRow, use the Add method to add the new DataRow to the DataRowCollection. Finally, call the AcceptChanges method of the DataTable object to confirm the addition. For more information about adding data to a DataTable, see Adding Data to a Table.
You can delete a DataRow from the DataRowCollection by calling the Remove method of the DataRowCollection, or by calling the Delete method of the DataRow object. The Remove removes the row from the collection. In contrast, Delete marks the DataRow for removal. The actual removal occurs when you call AcceptChanges method. By calling Delete, you can programmatically check which rows are marked for removal before actually deleting them. For more information, see Deleting a Row from a Table.
AcceptChanges Add DataColumnCollection DataColumn DataRowView DataTable HasVersion IsNull Item NewRow DataRowCollection