System.Data Namespace DataRow Class
Begins an edit operation on a DataRow object.
[ VB ]
Public Sub BeginEdit ( )
[ C# ]
void BeginEdit ( );
[ C++ ]
public: void BeginEdit ( );
[ JScript ]
public function BeginEdit ( );
Use the BeginEdit method to put a DataRow into edit mode. In this mode, events are temporarily suspended allowing the user to make multiple changes to more than one row without triggering validation rules. For example, if the values of several rows must add up to 100, you can put each of the rows into edit mode to suspend the validation of the row values until the user attempts to commit the values.
The BeginEdit method is called implicitly when the user changes the value of a data-bound control; the EndEdit method is called implicitly when you invoke the DataTable object's AcceptChanges method.
While in this edit mode, the DataRow stores representations of the original and new proposed values. Therefore, as long as the EndEdit method has not been called, you can retrieve either the original or proposed version by passing either DataRowVersion.Original or DataRowVersion.Proposed for the version parameter of the Item property. You can also cancel any edits at this time by invoking the CancelEdit method.
To see if the row contains an original or proposed value, call the HasVersion method.
DataRow Members AcceptChanges CancelEdit EndEdit HasVersion Item RowState