CommandField::ShowEditButton Property
Gets or sets a value indicating whether an Edit button is displayed in a CommandField field.
Assembly: System.Web (in System.Web.dll)
Property Value
Type: System::Booleantrue to display an Edit button in a CommandField; otherwise, false. The default is false.
Use the ShowEditButton property to specify whether an Edit button is displayed in the CommandField field for each record in the data-source control. The Edit button allows you to edit the values of a record.
When the user clicks an Edit button, input controls are displayed for each field in the record. The Edit button for the record is replaced with an Update button and a Cancel button, and all other command buttons for the record are hidden. Clicking the Update button updates the record with the new values in the data source, whereas clicking the Cancel button cancels the operation.
Note: |
|---|
When a data-bound control is used in combination with a data source control (such as a SqlDataSource control), the data-bound control can take advantage of the data source control's capabilities and provide automatic updating functionality. For other data sources, you must provide the routines to perform the update operation during the appropriate event for the data-bound control. |
When the ButtonType property of a CommandField field is set to ButtonType.Button or ButtonType.Link, use the EditText property to specify the text to display for an Edit button. Alternatively, you can display an image by first setting the ButtonType property to ButtonType.Image and then setting the EditImageUrl property.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note: