[Solved] How to disable enter alphabet symbols in Combobox C#?


You can use Regex As an example
In Combobox_TextChanged event if charcter match remove it

 private void comboBox1_TextChanged(object sender, EventArgs e)
 { 
    string rex=comboBox1.Text;
    Regex regex = new Regex(@"^\d$");


    if (regex.IsMatch(compare))
    { 
      rex= Regex.Replace(rex, @"(?<=\d),(?=\d)|[.]+(?=,)[A-Z]", "");
    }
    comboBox1.Text=rex;
  }

This can help you. Regex for numbers only

5

solved How to disable enter alphabet symbols in Combobox C#?