DataGridView.OnCellFormatting(DataGridViewCellFormattingEventArgs) メソッド

定義

CellFormatting イベントを発生させます。

protected:
 virtual void OnCellFormatting(System::Windows::Forms::DataGridViewCellFormattingEventArgs ^ e);
protected virtual void OnCellFormatting (System.Windows.Forms.DataGridViewCellFormattingEventArgs e);
abstract member OnCellFormatting : System.Windows.Forms.DataGridViewCellFormattingEventArgs -> unit
override this.OnCellFormatting : System.Windows.Forms.DataGridViewCellFormattingEventArgs -> unit
Protected Overridable Sub OnCellFormatting (e As DataGridViewCellFormattingEventArgs)

パラメーター

e
DataGridViewCellFormattingEventArgs

イベント データを格納している DataGridViewCellFormattingEventArgs

例外

eColumnIndex プロパティの値が、コントロール内の列数から 1 を引いた値を超えています。

- または -

eRowIndex プロパティの値が、コントロール内の行数から 1 を引いた値を超えています。

注釈

イベントを発生させると、イベント ハンドラーがデリゲートから呼び出されます。 詳細については、処理とイベントの発生 を参照してください。

OnCellFormatting メソッドを使用すると、デリゲートを結び付けずに、派生クラスでイベントを処理することもできます。 派生クラスでイベントを処理する場合は、この手法をお勧めします。

注意 (継承者)

派生クラスで OnCellFormatting(DataGridViewCellFormattingEventArgs) をオーバーライドする場合は、登録されているデリゲートがイベントを受け取ることができるように、基本クラスの OnCellFormatting(DataGridViewCellFormattingEventArgs) メソッドを呼び出してください。

適用対象

こちらもご覧ください