DataGridViewCellStateChangedEventArgs.StateChanged Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the state that has changed on the cell.
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
Property Value
One of the DataGridViewElementStates values indicating the state that has changed on the cell.
Examples
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");
}
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
Applies to
See also
Colaborar conosco no GitHub
A fonte deste conteúdo pode ser encontrada no GitHub, onde você também pode criar e revisar problemas e solicitações de pull. Para obter mais informações, confira o nosso guia para colaboradores.