DataView.AllowEdit 屬性

定義

取得或設定值,指出是否允許編輯。

public:
 property bool AllowEdit { bool get(); void set(bool value); };
public bool AllowEdit { get; set; }
[System.Data.DataSysDescription("DataViewAllowEditDescr")]
public bool AllowEdit { get; set; }
member this.AllowEdit : bool with get, set
[<System.Data.DataSysDescription("DataViewAllowEditDescr")>]
member this.AllowEdit : bool with get, set
Public Property AllowEdit As Boolean

屬性值

如果允許編輯,則為 true;否則為 false

屬性

範例

下列範例會在 AllowEdit 編輯 中的數據 DataView列之前叫用 方法。

private void EditRow(DataView view)
{
    view.AllowEdit = true;
    view[0].BeginEdit();
    view[0]["FirstName"] = "Mary";
    view[0]["LastName"] = "Jones";
    view[0].EndEdit();
}
Private Sub EditRow(view As DataView)
    view.AllowEdit = True
    view(0).BeginEdit
    view(0)("FirstName") = "Mary"
    view(0)("LastName") = "Jones"
    view(0).EndEdit
End Sub

適用於

另請參閱