Bagikan melalui


DataView.AllowEdit Properti

Definisi

Mendapatkan atau menetapkan nilai yang menunjukkan apakah pengeditan diizinkan.

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

Nilai Properti

true, jika pengeditan diizinkan; jika tidak, false.

Atribut

Contoh

Contoh berikut memanggil AllowEdit metode sebelum mengedit baris dalam 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

Berlaku untuk

Lihat juga