asp.net.ph

ButtonColumn.ButtonType Property

System.Web.UI.WebControls Namespace   ButtonColumn Class


Sets or retrieves the type of button to render in the column.

Syntax


Inline <asp:buttoncolumn buttontype = enumValue ... >
Script ButtonColumn.ButtonType = enumValue

Property Value


enumValue One of the ButtonColumnType values.

The property is read/write with a default value of LinkButton.

Exceptions


Exception Type Condition
ArgumentException The given column type is not one of the ButtonColumnType values.

Remarks

Use this property to specify whether the buttons in the column are displayed as link or push buttons.

Clicking on the command buttons in the column raises the ItemCommand event. You can programmatically control the action performed when the command button is clicked by providing an event handler for the ItemCommand event.

Example

The following example demonstrates how to set the ButtonType property of a ButtonColumn at design time, and how to dynamically set the style properties of the buttons in the column at run time.

 Show me 

See Also

ButtonColumn Members   Adding Button Columns to a DataGrid Control 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