Is there a way to prevent negative values from being entered into this control? I have need of a numeric textbox that cannot allow a negative value. I can convert the value back to positive inside the TextChanged event, but the CurrencyNegativePattern is still adding the formatting for a negative value. Any ideas?
DJDavis Jebaraj Syncfusion Team March 14, 2003 12:48 PM
The CurrencyTextBox control does not provide a property or method to prevent non negative values. This can be achieved by deriving from the CurrencyTextBox control and overriding ProcessCmdKey and Text property. I have attached a sample to this message that shows this method.
JHJamie HillMarch 19, 2003 09:46 AM
That works great. Thank you very much.
JHJamie HillMarch 24, 2003 01:57 PM
I also found a workaround for this. You can change the negative color to be the same as the positive color, set the CurrencyNegativePattern to 1, and set the NegativeSign property to nothing and it will not change any formatting when negative values are entered.