DataGridViewCellStateChangedEventArgs.Cell Property

 

Gets the DataGridViewCell that has a changed state.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public DataGridViewCell Cell { get; }

Property Value

Type: System.Windows.Forms.DataGridViewCell

The DataGridViewCell whose state has changed.

The following code example illustrates the use of this type.

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");
}

.NET Framework
Available since 2.0
Return to top
Show: