O'Reilly logo

ADO.NET in a Nutshell by Bill Hamilton, Matthew MacDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Comments/Troubleshooting

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

Table 25-1. DataRow properties

Property

Description

HasErrors

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

RowError

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

RowState

Gets the current row state.

Table

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

Collection

Description

ItemArray

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

Method

Description

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required