I have a maskedtextbox (msktxtbxAmount )defined thus: Mask $#####.## and
msktxtbxAmount. ValidatingType = typeof(System.D ecimal) with a PromptChar of =.
I have defined: decimal transAmount and the following event handler:
private void msktxtbxAmount_ TypeValidationC ompleted(object sender,
TypeValidationE ventArgs e)
{
if (!e.IsValidInpu t)
{
MessageBox.Show ("Invalid amount", "Error",
MessageBoxButto ns.OK);
}
else
{
transAmount = (decimal)e.Retu rnValue;
}
}
After data entry the text shows "$===35.00" yet I am showing the "Invalid
Amount" error message.
Can anyone point out where I have gone wrong?
Thanks
Comment