System.Data Namespace DataView Class
Sets or retrieves a value indicating whether deletes are allowed.
Script |
DataView.AllowDelete [ = true | false ] |
This property accepts or returns only a boolean value: true, if deletes are allowed; otherwise, false.
The following example checks the AllowDelete property before deleting a DataRow from a DataView.
private void CheckAllowDelete ( DataRow rowToDelete ) {
DataView dv = new DataView ( ds.Tables [ "Suppliers" ] );
if ( dv.AllowDelete ) {
rowToDelete.Delete ( );
}
}
Private Sub CheckAllowDelete ( rowToDelete As DataRow )
Dim dv As New DataView ( ds.Tables ( "Suppliers" )
If dv.AllowDelete Then
rowToDelete.Delete ( )
End If
End Sub |
|
C# |
VB |
DataView Members AllowEdit AllowNew