private void dataGridViewOrder_CellValidating(object sender, DataGridViewCellValidatingEventArgs er)
{
Eventually if the article exists the article is added to the datagridview row which the cellvalidating event came from. Then the focus is changed to the amount cell with the code below:
Main.dataGridViewOrder.CurrentCell = Main.dataGridViewOrder["Amount", row];
Main.dataGridViewOrder.BeginEdit(true);
What happens is that the datagridview jumps to the last blank row (the new row the datagridview paints when you edit the last row) and selects the amount cell in that row instead of the row that was just added. The row variable is the right rownumber but still it jumps to the last row for some reason. I tread about everything i could think about and nothing has helped me, anyone got an idea how to solve this ? It seems to be something with the validating event but i cant trace down what it is.