次の方法で共有


DataGridViewCell.InheritedStyle プロパティ

定義

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

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

プロパティ値

現在セルに適用されている DataGridViewCellStyle

属性

例外

セルは、 DataGridView コントロールに属していません。

-又は-

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

セルを含む行は共有行です。

-又は-

セルは列ヘッダー セルです。

注釈

DataGridView コントロールは、DataGridViewCellStyle型の他のプロパティからスタイルを継承する、セル InheritedStyle プロパティによって示されるスタイルを使用してセルを表示します。 Style プロパティで指定されたスタイルは、他のすべてのセル スタイル プロパティで指定されたスタイルをオーバーライドしますが、セルの外観に影響するすべてのスタイルを必ずしも示すわけではありません。

詳細については、「 Windows フォーム DataGridView コントロールのセル スタイル」を参照してください。

適用対象

こちらもご覧ください