共用方式為


ButtonColumnType 列舉

定義

指定 ButtonColumn 物件的按鈕類型。

public enum class ButtonColumnType
public enum ButtonColumnType
type ButtonColumnType = 
Public Enum ButtonColumnType
繼承
ButtonColumnType

欄位

名稱 Description
LinkButton 0

超連結按鈕的資料行。

PushButton 1

按鈕的資料行。

範例

private void Page_Init(Object sender, EventArgs e)
{

   // Create dynamic column to add to Columns collection.
   ButtonColumn AddColumn = new ButtonColumn();
   AddColumn.HeaderText="Add Item";
   AddColumn.Text="Add";
   AddColumn.CommandName="Add";
   AddColumn.ButtonType = ButtonColumnType.PushButton;

   // Add column to Columns collection.
   ItemsGrid.Columns.AddAt(2, AddColumn);
}
Private Sub Page_Init(sender As Object, e As EventArgs)
    
    ' Create dynamic column to add to Columns collection.
    Dim AddColumn As New ButtonColumn()
    AddColumn.HeaderText = "Add Item"
    AddColumn.Text = "Add"
    AddColumn.CommandName = "Add"
    AddColumn.ButtonType = ButtonColumnType.PushButton

    
    ' Add column to Columns collection.
    ItemsGrid.Columns.AddAt(2, AddColumn)
End Sub

備註

列舉 ButtonColumnType 表示 物件的按鈕樣式 ButtonColumn

適用於

另請參閱