Begins an edit procedure.
[Visual Basic] Overridable Public Sub BeginEdit() [C#] public virtual void BeginEdit(); [C++] public: virtual void BeginEdit(); [JScript] public function BeginEdit();
When invoked, the BeginEdit method places the DataRow into a state in which both the original version of the data exists along with the current data. If you invoke CancelEdit, the changes are rejected, and the original data reinstated. If you invoke EndEdit, the state changes
The following example edits a row in a DataView. calling the BeginEdit before, and EndEdit afterwards.
[Visual Basic]
Private Sub EditRow(dv As DataView) dv.AllowEdit = True dv(0).BeginEdit dv(0)("FirstName") = "Mary" dv(0)("LastName") = "Jones" dv(0).EndEdit End Sub
DataRowView Class | DataRowView Members | System.Data Namespace | AcceptChanges | AllowDelete | AllowEdit | AllowNew | CancelEdit | DataRow | EndEdit