DataGridViewHeaderCell 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
包含資料列行首儲存格和資料行行首儲存格所通用的功能。
public ref class DataGridViewHeaderCell : System::Windows::Forms::DataGridViewCell
public class DataGridViewHeaderCell : System.Windows.Forms.DataGridViewCell
type DataGridViewHeaderCell = class
inherit DataGridViewCell
Public Class DataGridViewHeaderCell
Inherits DataGridViewCell
- 繼承
- 衍生
備註
這個類別是其他標頭資料格類別的基類,例如 DataGridViewRowHeaderCell 和 DataGridViewColumnHeaderCell 。 若要建立自訂資料列標頭圖示或資料行行首字元,請繼承自 DataGridViewHeaderCell 類別,並新增功能來繪製您自己的圖示或圖像。
給繼承者的注意事項
當您衍生自 DataGridViewHeaderCell 並新增屬性至衍生類別時,請務必覆寫 Clone() 方法,以在複製作業期間複製新屬性。 您也應該呼叫基類 Clone() 的 方法,以便基類的屬性複製到新的儲存格。
建構函式
DataGridViewHeaderCell() |
初始化 DataGridViewHeaderCell 類別的新執行個體。 |
屬性
AccessibilityObject |
取得指定給 DataGridViewCell.DataGridViewCellAccessibleObject 的 DataGridViewCell。 (繼承來源 DataGridViewCell) |
ButtonState |
取得標題儲存格的類似於按鈕之視覺化狀態。 |
ColumnIndex |
取得這個儲存格的資料行索引。 (繼承來源 DataGridViewCell) |
ContentBounds |
取得圍住儲存格內容區域的周框。 (繼承來源 DataGridViewCell) |
ContextMenuStrip |
取得或設定與儲存格相關聯的捷徑功能表。 (繼承來源 DataGridViewCell) |
DataGridView |
取得與這個項目有關聯的 DataGridView 控制項。 (繼承來源 DataGridViewElement) |
DefaultNewRowValue |
取得新資料錄之資料列中儲存格的預設值。 (繼承來源 DataGridViewCell) |
Displayed |
取得值,該值表示儲存格目前是否顯示於螢幕上。 |
EditedFormattedValue |
取得目前已格式化的儲存格值,不管儲存格是否處於編輯模式,而值是否尚未認可。 (繼承來源 DataGridViewCell) |
EditType |
取得儲存格的裝載編輯控制項型別。 (繼承來源 DataGridViewCell) |
ErrorIconBounds |
取得儲存格之錯誤圖示的界限。 (繼承來源 DataGridViewCell) |
ErrorText |
取得或設定文字,描述與儲存格相關聯的錯誤狀況。 (繼承來源 DataGridViewCell) |
FormattedValue |
取得儲存格的格式化值,以供顯示。 (繼承來源 DataGridViewCell) |
FormattedValueType |
取得已格式化的儲存格值的型別。 |
Frozen |
取得指出是否已凍結此儲存格的值。 |
HasStyle |
取得指出是否已經設定 Style 屬性的值。 (繼承來源 DataGridViewCell) |
InheritedState |
取得儲存格的目前狀態,是繼承其資料列和資料行的狀態。 (繼承來源 DataGridViewCell) |
InheritedStyle |
取得目前套用至儲存格的樣式。 (繼承來源 DataGridViewCell) |
IsInEditMode |
取得指出目前是否正在編輯這個儲存格的值。 (繼承來源 DataGridViewCell) |
OwningColumn |
取得包含這個儲存格的資料行。 (繼承來源 DataGridViewCell) |
OwningRow |
取得包含這個儲存格的資料列。 (繼承來源 DataGridViewCell) |
PreferredSize |
取得能夠容納儲存格的矩形區域大小 (以像素為單位)。 (繼承來源 DataGridViewCell) |
ReadOnly |
取得值,指出此標題儲存格是否為唯讀。 |
Resizable |
取得值,指出是否可調整儲存格的大小。 |
RowIndex |
取得儲存格的父資料列索引。 (繼承來源 DataGridViewCell) |
Selected |
取得或設定值,指出是否已選取此儲存格。 |
Size |
取得儲存格的大小。 (繼承來源 DataGridViewCell) |
State |
取得此項目的使用者介面 (UI) 狀態。 (繼承來源 DataGridViewElement) |
Style |
取得或設定儲存格的樣式。 (繼承來源 DataGridViewCell) |
Tag |
取得或設定物件,其中包含儲存格的相關補充資料。 (繼承來源 DataGridViewCell) |
ToolTipText |
取得或設定與這個儲存格相關聯的工具提示文字。 (繼承來源 DataGridViewCell) |
Value |
取得或設定與這個儲存格相關聯的值。 (繼承來源 DataGridViewCell) |
ValueType |
取得儲存在儲存格中的值之型別。 |
Visible |
取得值,指出儲存格是否可見。 |
方法
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應