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


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

 property Type ^ DefaultHeaderCellType { Type ^ get(); void set(Type ^ value); };
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.