System.Data Namespace DataView Class
Sets or retrieves a value indicating whether edits are allowed.
Script |
DataView.AllowEdit [ = true | false ] |
This property accepts or returns only a boolean value: true, if edits are allowed; otherwise, false.
The following example invokes the AllowEdit method before editing a row in a DataView.
private void EditRow ( DataView dv ) {
dv.AllowEdit = true;
dv [ 0 ].BeginEdit ( );
dv [ 0 ] [ "FirstName" ] = "Mary";
dv [ 0 ] [ "LastName" ] = "Jones";
dv [ 0 ].EndEdit ( );
}
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 |
|
C# |
VB |
DataView Members AllowDelete AllowNew BeginEdit EndEdit