>>>I used to know this in another life... sigh....
>>>
>>>OK gurus... what am I doing wrong today (besides breathing)????
>>
>>You need a space after the @ clauses: "@R 9,999,999,999,999"
>
>I tried that, but to no avail.
>
>Maybe I'm still being misleading in my explanation... so here goes again!......
>
>I have a grid. I have a text (character) field displaying the file sizes bound in this grid to a cursor. It is a character field of 12.
>
>The numbers are integer-strings. I would like for them to have the commas displayed (which they don't have in their data).
>
>So what do I do with the Format/InputMask properties of the field.
>
>I am stuck at the moment, but I appreciate the help.
What I tried was ?"123456789" picture "@R 999,999,999" and that sure worked.
For a textbox in the grid, it's not that easy, but still easy enough. First, set the controlsource to "val(yournumericfield)" at the column level (not textbox). That will make your field read-only, but you can always stuff a different current control if you want. You may have to do it in the .init (of the textbox, or higher up), not sure of the exact way of setting this in PEM window.
Second, put R into textbox.format, and 999,999,999,999 into its .InputMask property. Give it a try.
Here's the form.init I just tried:
With This.grid1.Column1
.ControlSource="val(c1)"
.sparse=.f.
With .text1
.Format="R"
.InputMask="999,999,999,999"
Endwith
Endwith
The sparse=.f. makes it use the same inputmask in all rows, not just the current.