The commonly used public properties of the DataRow class are listed in Table 25-1.

Table 25-1. DataRow properties




Gets a value indicating whether there are errors in the row.


Gets or sets a value containing the error description text for a row.


Gets the current row state.


Gets the table that the row belongs to and has a schema for.

The commonly used public collections of the DataRow class are listed in Table 25-2.

Table 25-2. DataRow collection




Gets or sets the values for the columns in the row as an object array.

The commonly used public methods of the DataRow class are listed in Table 25-3.

Table 25-3. DataRow methods



AcceptChanges( )

Commits all changes made to the row since the last time it was loaded or since the last time changes were committed.

BeginEdit( )

Puts the row into edit mode, suspending the events that trigger validation rules.

CancelEdit( )

Cancels the edit on the row, discarding any changes.

ClearErrors( )

Clears both row and column errors for the row.

Delete( )

If the row is newly added, it is removed from the table. Otherwise, the row is marked for deletion.

EndEdit( )

Ends the edit on the row, committing the changes made.

GetChildRows( )

Gets an array of child rows for the row, based on a specified relationship.

GetColumnError( )

Gets the error description for a specified column in the ...

Get ADO.NET in a Nutshell now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.