Condividi tramite


EntityDataSource.EnableInsert Proprietà

Definizione

Ottiene o imposta un valore che indica se gli oggetti possono essere aggiunti tramite il EntityDataSource controllo .

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

Valore della proprietà

true se le operazioni di inserimento automatico sono abilitate; in caso contrario, false. Il valore predefinito è false.

Implementazioni

Commenti

Select non può essere impostato se la EnableInsert proprietà è impostata su true.

Un false valore assegnato alla EnableInsert proprietà sulla EntityDataSource forza la CanInsert proprietà dell'oggetto correlato EntityDataSourceView a restituire false. Quando la EnableInsert proprietà è impostata su false, viene generato un NotSupportedException oggetto se il controllo associato a dati chiama il ExecuteInsert metodo su EntityDataSourceView.

Se una delle condizioni per l'updatabilità non viene soddisfatta e la EnableInsert proprietà è impostata su true, genera un'eccezione EntityDataSource .

Si applica a