ButtonColumn

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 CommandName 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.

public class ButtonColumn : DataGridColumn { // Public Constructors    public ButtonColumn( ); // Public Instance Properties    public virtual ButtonColumnType ButtonType{set; get; }    public virtual string CommandName{set; get; }    public virtual string DataTextField{set; get; }    public virtual string DataTextFormatString{set; get; }    public virtual string Text{set; get; } // Public Instance Methods    public override void Initialize( );               // overrides DataGridColumn    public override void InitializeCell(TableCell cell, int columnIndex, ListItemType itemType);               // overrides DataGridColumn // Protected Instance Methods    protected virtual string FormatDataTextValue(object dataTextValue); }

Hierarchy

System.Object DataGridColumn(System.Web.UI.IStateManager) ButtonColumn



ASP. NET in a Nutshell
ASP.NET in a Nutshell, Second Edition
ISBN: 0596005202
EAN: 2147483647
Year: 2003
Pages: 873

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net