
ButtonColumn | 831
WebControls
Namespace
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
Hierarchy
System.Object ➝ System.Web.UI.Control(System.ComponentModel.IComponent, System.
IDisposable, System.Web.UI.IParserAccessor, System.Web.UI.IDataBindingsAccessor)
➝
WebControl(System.Web.UI.IAttributeAccessor) ➝ Button(System.Web.UI.
IPostBackEventHandler)
ButtonColumn
System.Web.UI.WebControls (system.web.dll)
class
The ButtonColumn class represents a type of column that can be used in a DataGrid control.
This column consists of buttons that raise the DataGrid.ItemCommand event. These buttons
can be displayed as graphical push buttons (like Button) or text links, depending on the
ButtonType property.
The Text property determines what text is displayed for the button, while the Command-
Name property specifies a string of additional information that will be sent to the
DataGrid.ItemCommand event through the DataGridCommandEventArgs object.
If you set the Text and CommandName properties, all buttons in the column will share the
same information. Alternatively, you can set the DataTextField property to use data
binding and the DataTextFormatString property to specify formatting rules.
Hierarchy
System.Object ➝ DataGridColumn(System.Web.UI.IStateManager) ➝ ButtonColumn
protected override void AddAttributesToRender(System.Web.UI.HtmlTextWriter ...