DataView.AllowDelete Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that indicates whether deletes are allowed.
public:
property bool AllowDelete { bool get(); void set(bool value); };
public bool AllowDelete { get; set; }
[System.Data.DataSysDescription("DataViewAllowDeleteDescr")]
public bool AllowDelete { get; set; }
member this.AllowDelete : bool with get, set
[<System.Data.DataSysDescription("DataViewAllowDeleteDescr")>]
member this.AllowDelete : bool with get, set
Public Property AllowDelete As Boolean
Property Value
true
, if deletes are allowed; otherwise, false
.
- Attributes
Examples
The following example checks the AllowDelete property before deleting a DataRow from a DataView.
private void CheckAllowDelete(DataRow rowToDelete)
{
DataView view = new DataView(DataSet1.Tables["Suppliers"]);
if (view.AllowDelete)
rowToDelete.Delete();
}
Private Sub CheckAllowDelete(rowToDelete As DataRow)
Dim view As New DataView(DataSet1.Tables("Suppliers"))
If view.AllowDelete Then
rowToDelete.Delete()
End If
End Sub
Applies to
See also
Співпраця з нами на GitHub
Джерело цього вмісту можна знайти на GitHub, де також можна створювати й переглядати запитання та запити на внесення змін. Докладні відомості наведено в нашому посібнику для співавторів.
Зворотний зв’язок
https://aka.ms/ContentUserFeedback.
Очікується незабаром: протягом 2024 року ми будемо припиняти використання механізму реєстрації проблем у GitHub для зворотного зв’язку щодо вмісту й замінювати його новою системою зворотного зв’язку. Докладніше:Надіслати й переглянути відгук про