P
Paolo
I have a maskedtextbox (msktxtbxAmount)defined thus: Mask $#####.## and
msktxtbxAmount.ValidatingType = typeof(System.Decimal) with a PromptChar of =.
I have defined: decimal transAmount and the following event handler:
private void msktxtbxAmount_TypeValidationCompleted(object sender,
TypeValidationEventArgs e)
{
if (!e.IsValidInput)
{
MessageBox.Show("Invalid amount", "Error",
MessageBoxButtons.OK);
}
else
{
transAmount = (decimal)e.ReturnValue;
}
}
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
msktxtbxAmount.ValidatingType = typeof(System.Decimal) with a PromptChar of =.
I have defined: decimal transAmount and the following event handler:
private void msktxtbxAmount_TypeValidationCompleted(object sender,
TypeValidationEventArgs e)
{
if (!e.IsValidInput)
{
MessageBox.Show("Invalid amount", "Error",
MessageBoxButtons.OK);
}
else
{
transAmount = (decimal)e.ReturnValue;
}
}
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