System.Web.UI.WebControls.DetailsView.DefaultMode Property

Get or sets the default data-entry mode of the System.Web.UI.WebControls.DetailsView control.

Syntax

[System.ComponentModel.DefaultValue(System.Web.UI.WebControls.DetailsViewMode.ReadOnly)]
public virtual DetailsViewMode DefaultMode { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use the DetailsView.DefaultMode property to specify whether the System.Web.UI.WebControls.DetailsView control returns to edit, insert, or read-only mode after an edit or insert operation is performed. By default, the System.Web.UI.WebControls.DetailsView control returns to read-only mode; however, you can keep the System.Web.UI.WebControls.DetailsView control in edit or insert mode by setting this property to the appropriate value. The following table lists the different mode values.

DetailsViewMode.Edit

The System.Web.UI.WebControls.DetailsView control is in edit mode, which allows the user to update the values of a record.

DetailsViewMode.Insert

The System.Web.UI.WebControls.DetailsView control is in insert mode, which allows the user to add a new record to the data source.

DetailsViewMode.ReadOnly

The System.Web.UI.WebControls.DetailsView control is in read-only mode, which is the normal display mode.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0