DataView.AllowNew Özellik
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
yöntemi kullanılarak AddNew() yeni satırların eklenip eklenemeyeceğini belirten bir değer alır veya ayarlar.
public:
property bool AllowNew { bool get(); void set(bool value); };
public bool AllowNew { get; set; }
[System.Data.DataSysDescription("DataViewAllowNewDescr")]
public bool AllowNew { get; set; }
member this.AllowNew : bool with get, set
[<System.Data.DataSysDescription("DataViewAllowNewDescr")>]
member this.AllowNew : bool with get, set
Public Property AllowNew As Boolean
true
, yeni satırlar eklenebiliyorsa; aksi takdirde , false
.
- Öznitelikler
Aşağıdaki örnek, yöntemiyle yeni bir satır eklemeden önce özelliğini true olarak AddNew ayarlarAllowNew.
private void AddNew()
{
DataTable table = new DataTable();
// Not shown: code to populate DataTable.
DataView view = new DataView(table);
view.AllowNew = true;
DataRowView rowView = view.AddNew();
rowView["ProductName"] = "New Product Name";
}
Private Sub AddNew()
Dim table As New DataTable()
' Not shown: code to populate DataTable.
Dim view As New DataView(table)
view.AllowNew = True
Dim rowView As DataRowView
rowView = view.AddNew
rowView("ProductName") = "New Product Name"
End Sub
Ürün | Sürümler |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
.NET geri bildirimi
.NET, açık kaynak bir projedir. Geri bildirim sağlamak için bir bağlantı seçin: