Hello all, i have been searching for a while and found some codes, but they did not work. I am looking for a code that doesnt allow letters to be entered in a dataGridView column.
I tried this code:
private void fra1DataGridViewTextBoxColumn_KeyPress(object sender, KeyPressEventArgs e)
{
if (!char.IsDigit(e.KeyChar) && e.KeyChar != (char)Keys.Back)
e.Handled = true;
}
But it didnt work. Can anyone help me?