Language

DataGridViewCell.GetInheritedStyle メソッド

定義

セルに適用されるスタイルを取得します。

public:
 virtual System::Windows::Forms::DataGridViewCellStyle ^ GetInheritedStyle(System::Windows::Forms::DataGridViewCellStyle ^ inheritedCellStyle, int rowIndex, bool includeColors);
public virtual System.Windows.Forms.DataGridViewCellStyle GetInheritedStyle(System.Windows.Forms.DataGridViewCellStyle inheritedCellStyle, int rowIndex, bool includeColors);
public virtual System.Windows.Forms.DataGridViewCellStyle GetInheritedStyle(System.Windows.Forms.DataGridViewCellStyle? inheritedCellStyle, int rowIndex, bool includeColors);
abstract member GetInheritedStyle : System.Windows.Forms.DataGridViewCellStyle * int * bool -> System.Windows.Forms.DataGridViewCellStyle
override this.GetInheritedStyle : System.Windows.Forms.DataGridViewCellStyle * int * bool -> System.Windows.Forms.DataGridViewCellStyle
Public Overridable Function GetInheritedStyle (inheritedCellStyle As DataGridViewCellStyle, rowIndex As Integer, includeColors As Boolean) As DataGridViewCellStyle

パラメーター

inheritedCellStyle
DataGridViewCellStyle

継承されたセル スタイルで設定する DataGridViewCellStyle 。

rowIndex
Int32

セルの親行のインデックス。

includeColors
Boolean

true 返されたセル スタイルに継承された色を含める場合。それ以外の場合は false。

返品

セルの親行、列、およびDataGridViewCellStyleから継承されたセルのスタイル設定を含むDataGridView。

例外

セルに関連付けられた DataGridViewがありません。

-又は-

ColumnIndex が 0 未満の場合は、セルが行ヘッダー セルであることを示します。

rowIndex が 0 未満であるか、親 DataGridView内の行数以上です。

注釈

このメソッドは、セルの親行、列、およびDataGridViewCellStyleのDataGridViewCellStyle オブジェクトから設定を継承するDataGridViewを返します。 詳細については、「Windows フォーム DataGridView コントロールの セル のスタイル」を参照してください。

適用対象

こちらもご覧ください