This documentation is archived and is not being maintained.

DataView.AllowDelete Property

Sets or gets a value indicating whether deletes are allowed.

[Visual Basic]
Public Property AllowDelete As Boolean
public bool AllowDelete {get; set;}
public: __property bool get_AllowDelete();
public: __property void set_AllowDelete(bool);
public function get AllowDelete() : Boolean;
public function set AllowDelete(Boolean);

Property Value

true, if deletes are allowed; otherwise, false.


[Visual Basic, C#, C++] The following example checks the AllowDelete property before deleting a DataRow from a DataView.

[Visual Basic] 
Private Sub CheckAllowDelete(rowToDelete As DataRow)
   Dim dv As DataView = New DataView(DataSet1.Tables("Suppliers"))
   If dv.AllowDelete Then
   End If
End Sub

private void CheckAllowDelete(DataRow rowToDelete)
   DataView dv = new DataView(DataSet1.Tables["Suppliers"]);
   if (dv.AllowDelete)

 void CheckAllowDelete(DataRow* rowToDelete)
    DataView* dv = new DataView(DataSet1->Tables->Item[S"Suppliers"]);
    if (dv->AllowDelete)

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

DataView Class | DataView Members | System.Data Namespace