DataView.AllowDelete Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Sets or gets a value that indicates whether deletes are allowed.

Namespace:   System.Data
Assembly:  System.Data (in System.Data.dll)

Public Property AllowDelete As Boolean

Property Value

Type: System.Boolean

true, if deletes are allowed; otherwise, false.

The following example checks the AllowDelete property before deleting a DataRow from a DataView.

Private Sub CheckAllowDelete(rowToDelete As DataRow)
    Dim view As DataView = New DataView(DataSet1.Tables("Suppliers"))
    If view.AllowDelete Then
    rowToDelete.Delete()
    End If
End Sub

.NET Framework
Available since 1.1
Return to top
Show: