EntityDataSource.EnableInsert 屬性

定義

取得或設定值,這個值指出是否可以透過 EntityDataSource 控制項加入物件。

public:
 property bool EnableInsert { bool get(); void set(bool value); };
public bool EnableInsert { get; set; }
member this.EnableInsert : bool with get, set
Public Property EnableInsert As Boolean

屬性值

如果已啟用自動插入作業則為 true,否則為 false。 預設值是 false

實作

備註

Select如果 屬性設定為 trueEnableInsert 則無法設定。

false指派給 EnableInsert 屬性的值會 EntityDataSource 強制 CanInsert 相關 EntityDataSourceView 物件的 屬性傳回 falseEnableInsert當 屬性設定為 false 時, NotSupportedException 如果資料繫結控制項呼叫 ExecuteInsert 上的 EntityDataSourceView 方法,就會引發 。

如果不符合任何更新性的條件,且 EnableInsert 屬性設定 true 為 ,則會 EntityDataSource 引發例外狀況。

適用於