asp.net.ph

CommandField.ShowCancelButton Property

System.Web.UI.WebControls Namespace   CommandField Class


.NET Framework version 2.0

Sets or retrieves a value indicating whether a Cancel button is displayed in a CommandField.

Syntax


Inline <asp:commandfield showcancelbutton = true | false ... >
Script CommandField.ShowCancelButton [ = true | false ]

Property Value

This property accepts or returns only a boolean value: true to display a Cancel button in a CommandField; otherwise, false. Default value is true.

Remarks

Use the ShowCancelButton property to specify whether a Cancel button is displayed for each data row in a CommandField control when in edit or insert mode.

NOTE: A Cancel button is shown by default in either insert or edit mode, unless otherwise specified.

Clicking the Cancel button for a row cancels the edit or insert operation and returns the record to its normal display mode.

When the ButtonType property of a CommandField is set to Button or Link, use the CancelText property to specify the text to display for a Cancel button.

Alternatively, you can display an image by first setting the ButtonType property to Image and then setting the CancelImageUrl property.

Example

The following example shows how to set up a CommandField in a DetailsView control to display a Cancel image button when in insert or edit mode.

 Show me 

See Also

CommandField Members   ShowDeleteButton   ShowEditButton   ShowInsertButton   ShowSelectButton Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph