General information
Title:
Validating and Parse problems
I have been trying for a couple days to figure out how to create a textbox into which I can enter a time span as mm:ss.hh and store hundredths of a second to a bound table field. The table field is integer hundredths of a second and I use the Format method to display the value in the format mm:ss.hh
I use the Parse event to convert the text in the text value to an integer number of hundredths of a second. This works just fine if I enter a valid value. But if I enter an invalid value, I cannot figure out how to display an error message, then allow corrections to the invalid entry. No matter what I do, the value in the textbox is reset to whatever it was before I changed it.
I could not find any way from the Parse event to cancel the data save, so I tried adding a Validating Event handler and setting e.Cancel to true, but the Parse runs anyway, killing the value in the textbox.
Is this a problem with my understanding of the .NET framework, a "feature" of .NET, or a problem with using the Mere Mortals framework mmTextBox with binding? Any help will be appreciated.
...Jim
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only