DataGridView.OnCellPainting(DataGridViewCellPaintingEventArgs) 메서드

정의

CellPainting 이벤트를 발생시킵니다.

protected public:
 virtual void OnCellPainting(System::Windows::Forms::DataGridViewCellPaintingEventArgs ^ e);
protected internal virtual void OnCellPainting (System.Windows.Forms.DataGridViewCellPaintingEventArgs e);
abstract member OnCellPainting : System.Windows.Forms.DataGridViewCellPaintingEventArgs -> unit
override this.OnCellPainting : System.Windows.Forms.DataGridViewCellPaintingEventArgs -> unit
Protected Friend Overridable Sub OnCellPainting (e As DataGridViewCellPaintingEventArgs)

매개 변수

e
DataGridViewCellPaintingEventArgs

이벤트 데이터를 포함하는 DataGridViewCellPaintingEventArgs입니다.

예외

eColumnIndex 속성 값이 컨트롤의 열 수에서 1을 뺀 값보다 큽니다.

또는

eRowIndex 속성 값이 컨트롤의 행 수에서 1을 뺀 값보다 큽니다.

설명

이벤트가 발생하면 대리자를 통해 이벤트 처리기가 호출됩니다. 자세한 내용은 이벤트 처리 및 발생합니다.

또한 OnCellPainting 메서드를 사용하면 파생 클래스가 대리자를 연결하지 않고도 이벤트를 처리할 수 있습니다. 이는 파생 클래스에서 이벤트를 처리하는 기본 방법입니다.

상속자 참고

파생 클래스에서 OnCellPainting(DataGridViewCellPaintingEventArgs)를 재정의하는 경우 등록된 대리자가 이벤트를 받도록 기본 클래스의 OnCellPainting(DataGridViewCellPaintingEventArgs) 메서드를 호출해야 합니다.

적용 대상

추가 정보