Gets the current data-entry mode of the System.Web.UI.WebControls.DetailsView control.
Documentation for this section has not yet been entered.
Use the DetailsView.CurrentMode property to determine whether the System.Web.UI.WebControls.DetailsView control is in edit, insert, or read-only 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. |
DetailsViewMode.ReadOnly |
The System.Web.UI.WebControls.DetailsView control is in read-only mode, which is the normal display mode. |
This value is normally set automatically by the System.Web.UI.WebControls.DetailsView control by when the New, Update, Insert, Delete, or Cancel command button is clicked. You can also programmatically change the mode by using the DetailsView.ChangeMode(DetailsViewMode) method.
When the System.Web.UI.WebControls.DetailsView control changes modes, the events in the following table are raised. This allows you to create a custom event handler that performs a routine when the event occurs.
DetailsView.ModeChanged |
Occurs when a command button that changes the mode of the System.Web.UI.WebControls.DetailsView control is clicked, but after the mode changes. |
DetailsView.ModeChanging |
Occurs when a command button that changes the mode of the System.Web.UI.WebControls.DetailsView control is clicked, but before the mode changes. |