DataView.AllowDelete プロパティ

定義

削除が許可されているかどうかを示す値を取得または設定します。

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

プロパティ値

削除が許可される場合は true。それ以外の場合は false

属性

次の例では、 から をAllowDelete削除する前に プロパティをDataRowDataView確認します。

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

適用対象

こちらもご覧ください