DataGridViewBand.DefaultHeaderCellType 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定預設標題儲存格的執行階段型別。
public:
property Type ^ DefaultHeaderCellType { Type ^ get(); void set(Type ^ value); };
[System.ComponentModel.Browsable(false)]
public Type DefaultHeaderCellType { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.DefaultHeaderCellType : Type with get, set
Public Property DefaultHeaderCellType As Type
屬性值
Type,描述當做預設標題儲存格使用的物件之執行階段類別。
- 屬性
例外狀況
設定這個屬性時所指定的值並不是表示 Type 或衍生型別的 DataGridViewHeaderCell。
備註
這個屬性必須取得或設定 類別的 DataGridViewHeaderCell 實例或其衍生型別之一。 例如,類別 DataGridViewRow 會使用 DataGridViewRowHeaderCell 做為預設標頭資料格類型。 同樣地,類別 DataGridViewColumn 會使用 DataGridViewColumnHeaderCell 。
如果您在資料列或資料行中使用衍生自 DataGridViewHeaderCell 的自訂類型,則必須將 DefaultHeaderCellType 屬性設定為自訂類型。
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應