i want to run CellEndEdit only when value of cell is changed, tried putting
if (dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString() == e.For
I made it like so:
C#:
private void DynList_RowValidated(object sender, DataGridViewCellEventArgs e)
{
if (ChangedRow == true) {
ChangedRow = false;
//Row Changed...
}
}
bool ChangedRow;
private void DynList_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
ChangedRow = true;
}
VB.Net:
Private Sub DynList_RowValidated(ByVal sender As Object, ByVal e As DataGridViewCellEventArgs)
If ChangedRow = True Then
ChangedRow = False
'Row Changed...
End If
End Sub
Dim ChangedRow As Boolean
Private Sub DynList_CellValueChanged(ByVal sender As Object, ByVal e As DataGridViewCellEventArgs)
ChangedRow = True
End Sub
I tried like 1 hour to archieve this, because no one had a solution for that, so I thought it might be useful for others