Switches the System.Web.UI.WebControls.DetailsView control to the specified mode.
- newMode
- One of the System.Web.UI.WebControls.DetailsViewMode values.
Use the DetailsView.ChangeMode(DetailsViewMode) method to programmatically switch the System.Web.UI.WebControls.DetailsView control between edit, insert, and read-only mode. This method also updates the DetailsView.CurrentMode property with the specified mode. 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. |
DetailsView.ReadOnly |
The System.Web.UI.WebControls.DetailsView control is in read-only mode, which is the normal display mode. |