DataGridViewCellStateChangedEventArgs.StateChanged Propiedad

Definición

Obtiene el estado que ha cambiado en la celda.

public:
 property System::Windows::Forms::DataGridViewElementStates StateChanged { System::Windows::Forms::DataGridViewElementStates get(); };
public System.Windows.Forms.DataGridViewElementStates StateChanged { get; }
member this.StateChanged : System.Windows.Forms.DataGridViewElementStates
Public ReadOnly Property StateChanged As DataGridViewElementStates

Valor de propiedad

Uno de los valores de DataGridViewElementStates que indican el estado que ha cambiado en la celda.

Ejemplos

En el ejemplo de código siguiente se muestra el uso de este tipo.

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

Se aplica a

Consulte también