Gets or sets a value indicating whether a New button is displayed in a System.Web.UI.WebControls.CommandField field.
Documentation for this section has not yet been entered.
Use the CommandField.ShowInsertButton property to specify whether a New button is displayed in a System.Web.UI.WebControls.CommandField field. The New button is displayed only once in the System.Web.UI.WebControls.CommandField field and allows the user to add a new record in the data source.
This property applies only to data-bound controls that support insert operations, such as the System.Web.UI.WebControls.DetailsView control.
When the user clicks the New button, input controls are displayed for each field displayed in the data-bound control, allowing the user to enter the values for the new record. The New button is replaced with an Insert button and a Cancel button, and all other command buttons in the System.Web.UI.WebControls.CommandField field are hidden. Clicking the Insert button adds the record to the data source, whereas clicking the Cancel button cancels the operation.
When a data-bound control is used in combination with a data source control (such as a System.Web.UI.WebControls.SqlDataSource control), the data-bound control can take advantage of the data source control's capabilities and provide automatic insert functionality. For other data sources, you must provide the routines to perform the insert operation during the appropriate event for the data-bound control.
When the ButtonFieldBase.ButtonType property of a System.Web.UI.WebControls.CommandField field is set to ButtonType.Button or ButtonType.Link, use the CommandField.NewText property to specify the text to display for a New button. Alternatively, you can display an image by first setting the ButtonFieldBase.ButtonType property to ButtonType.Image and then setting the CommandField.NewImageUrl property.