NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataRowView.BeginEdit

Begins an edit procedure.

[Visual Basic]
Overridable Public Sub BeginEdit()
[C#]
public virtual void BeginEdit();
[C++]
public: virtual void BeginEdit();
[JScript]
public function BeginEdit();

Remarks

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

Example [Visual Basic]

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

See Also

DataRowView Class | DataRowView Members | System.Data Namespace | AcceptChanges | AllowDelete | AllowEdit | AllowNew | CancelEdit | DataRow | EndEdit