다음을 통해 공유


DataGridViewCellStateChangedEventArgs.Cell 속성

정의

상태가 변경된 DataGridViewCell을 가져옵니다.

public:
 property System::Windows::Forms::DataGridViewCell ^ Cell { System::Windows::Forms::DataGridViewCell ^ get(); };
public System.Windows.Forms.DataGridViewCell Cell { get; }
member this.Cell : System.Windows.Forms.DataGridViewCell
Public ReadOnly Property Cell As DataGridViewCell

속성 값

DataGridViewCell

상태가 변경된 DataGridViewCell입니다.

예제

다음 코드 예제에서는이 형식의 사용을 보여 줍니다.

private void dataGridView1_CellStateChanged(object sender,
    DataGridViewCellStateChangedEventArgs e)
{
    DataGridViewElementStates state = e.StateChanged;
    string msg = String.Format("Row {0}, Column {1}, {2}",
        e.Cell.RowIndex, e.Cell.ColumnIndex, e.StateChanged);
    MessageBox.Show(msg, "Cell State Changed");
}
Private Sub dataGridView1_CellStateChanged(ByVal sender As Object, _
    ByVal e As DataGridViewCellStateChangedEventArgs) _
    Handles dataGridView1.CellStateChanged

    Dim state As DataGridViewElementStates = e.StateChanged
    Dim msg As String = String.Format( _
        "Row {0}, Column {1}, {2}", _
        e.Cell.RowIndex, e.Cell.ColumnIndex, e.StateChanged)
    MessageBox.Show(msg, "Cell State Changed")

End Sub

적용 대상

추가 정보