I have a numeric column in a grid. I'd like the values to display using a value for inputmask of '9,999,999'.
However, the user can modify the data in this column, and the inputmask really screws things up when the user tries using the keyboard.Leave the InputMask on the column as '9,999,999'. That way, all the text boxes that do not have focus will be formatted nicely.
Next, create a numeric text box class for use in your grid and drop it in to the appropriate column. Add a custom property called cOldInputMask to the class. This code in the GotFocus()
WITH This
.cOldInputMask = .InputMask
.InputMask = STRTRAN( .cOldInputMask, ',', '' )
DODEFAULT()
ENDWITH
And this code in the LostFocus()
This.InputMask = This.cOldInputMask