DataGridViewBand.DefaultHeaderCellType DataGridViewBand.DefaultHeaderCellType DataGridViewBand.DefaultHeaderCellType DataGridViewBand.DefaultHeaderCellType Property

定義

取得或設定預設標題儲存格的執行階段型別。Gets or sets the run-time type of the default header cell.

public:
 property Type ^ DefaultHeaderCellType { Type ^ get(); void set(Type ^ value); };
[System.ComponentModel.Browsable(false)]
public Type DefaultHeaderCellType { get; set; }
member this.DefaultHeaderCellType : Type with get, set
Public Property DefaultHeaderCellType As Type

屬性值

Type,描述當做預設標題儲存格使用的物件之執行階段類別。A Type that describes the run-time class of the object used as the default header cell.

例外狀況

設定這個屬性時所指定的值並不是表示 Type 或衍生型別的 DataGridViewHeaderCellThe specified value when setting this property is not a Type representing DataGridViewHeaderCell or a derived type.

備註

這個屬性必須取得或設定DataGridViewHeaderCell類別的實例或它的其中一個衍生類型。This property must get or set an instance of the DataGridViewHeaderCell class or one of its derived types. 例如, DataGridViewRow類別會DataGridViewRowHeaderCell使用做為預設的標頭資料格類型。For example, the DataGridViewRow class uses a DataGridViewRowHeaderCell as the default header cell type. 同樣地, DataGridViewColumn類別會DataGridViewColumnHeaderCell使用。Similarly, the DataGridViewColumn class uses a DataGridViewColumnHeaderCell.

如果您使用從資料列或資料行DataGridViewHeaderCell中衍生的自訂類型, DefaultHeaderCellType則屬性必須設定為自訂類型。If you are using a custom type derived from DataGridViewHeaderCell in a row or column, the DefaultHeaderCellType property must be set to the custom type.

適用於

另請參閱