Name
ButtonColumn
Synopsis
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 : Inherits DataGridColumn ' Public Constructors Public Sub New() ' Public Instance Properties Overridable Public Property ButtonType As ButtonColumnType Overridable Public Property CommandName As String Overridable Public Property DataTextField As String Overridable Public Property DataTextFormatString As String Overridable Public Property Text As String ' Public Instance Methods Overrides Public Sub Initialize() Overrides Public Sub InitializeCell( ByVal cell As TableCell, ByVal columnIndex As Integer, ByVal itemType As ListItemType) ' Protected Instance Methods Overridable Protected Function FormatDataTextValue( ByVal dataTextValue As Object) As String End Class ...
Get ASP.NET in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.