There are several textboxes and the values each one of them increasing sequeantially. I mean
textbox1.Text<textbox2.Text<textbox3.Text<textbbox4.Text<.....
Which event can be used to validate this condtions. In the code below i used textChanged but in the scenario for example the value in the textbox1.Text=30
afterward when istart to type to textbox1.Text
value 5 (which i inteded to enter 59) the focus jump to textbox1
. What is the correct event comparing for two textboxes.
private void textbox2_TextChanged(object sender, EventArgs e)
{
if (double.Parse(textbox1.Text) > double.Parse(textbox2.Text))
{
textbox1.Focus();
errProvider1.SetError(textbox1, "Error");
}
}
Leave
-event: docs.microsoft.com/en-us/dotnet/api/… – Tim Schmelter