>Hi All
>
>Anyone have a class that will allow the user to enter numbers and force the decimal to 2 places. For example, the user will enter 123 and the text box will display 1.23 or user enters 2 and display 0.02.
>
>Thanks.
James,
You may define the textbox (say txtQuantity) with '999' as inputmask-property. This forces to accept only 3 digits. Then you chose the event when you wnat to convert the input to a two-decimals quantity. In that event you simply re-assign txtQuantity.value = txtQuantity.value/100
Regards,
Enrique
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement