DataGridView.ColumnWidthChanged 이벤트

정의

열의 Width 속성 값이 변경될 때 발생합니다.

public:
 event System::Windows::Forms::DataGridViewColumnEventHandler ^ ColumnWidthChanged;
public event System.Windows.Forms.DataGridViewColumnEventHandler ColumnWidthChanged;
member this.ColumnWidthChanged : System.Windows.Forms.DataGridViewColumnEventHandler 
Public Custom Event ColumnWidthChanged As DataGridViewColumnEventHandler 

이벤트 유형

DataGridViewColumnEventHandler

예제

다음 코드 예제에서는이 이벤트의 사용을 보여 줍니다. 이 예제는에서 사용할 수 있는 보다 큰 예제의 일부 방법: Windows Forms DataGridView 컨트롤에서 행 모양 사용자 지정합니다.

// Forces the control to repaint itself when the user 
// manually changes the width of a column.
void dataGridView1_ColumnWidthChanged(object sender,
    DataGridViewColumnEventArgs e)
{
    this.dataGridView1.Invalidate();
}
' Forces the control to repaint itself when the user 
' manually changes the width of a column.
Sub dataGridView1_ColumnWidthChanged(ByVal sender As Object, _
    ByVal e As DataGridViewColumnEventArgs) _
    Handles dataGridView1.ColumnWidthChanged

    Me.dataGridView1.Invalidate()

End Sub

설명

이벤트를 처리 하는 방법에 대 한 자세한 내용은 참조 하세요. 이벤트 처리 및 발생합니다.

적용 대상

추가 정보