DataGridViewColumn.InheritedStyle DataGridViewColumn.InheritedStyle DataGridViewColumn.InheritedStyle DataGridViewColumn.InheritedStyle Property

定義

取得目前套用至資料行的儲存格樣式。Gets the cell style currently applied to the column.

public:
 virtual property System::Windows::Forms::DataGridViewCellStyle ^ InheritedStyle { System::Windows::Forms::DataGridViewCellStyle ^ get(); };
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataGridViewCellStyle InheritedStyle { get; }
member this.InheritedStyle : System.Windows.Forms.DataGridViewCellStyle
Public Overrides ReadOnly Property InheritedStyle As DataGridViewCellStyle

屬性值

DataGridViewCellStyle,表示用來顯示資料行的儲存格樣式。A DataGridViewCellStyle that represents the cell style used to display the column.

備註

這個屬性可用來判斷資料行中所有資料格的資料格樣式,不論是否也套用至資料格的任何資料列樣式。This property is useful to determine which cell styles are applied to all cells in a column regardless of any row styles that are also applied to the cells. Column InheritedStyle屬性會DefaultCellStyle從和DataGridView.DefaultCellStyle屬性繼承其值。The column InheritedStyle property inherits its values from the DefaultCellStyle and the DataGridView.DefaultCellStyle property.

如需有關儲存格樣式繼承的詳細資訊,請參閱Windows Forms DataGridView 控制項中的儲存格樣式For more information about cell style inheritance, see Cell Styles in the Windows Forms DataGridView Control.

適用於

另請參閱