Hi!
FWIW, it is recommended to limit the width of the expression result to 200 characters and use the same data type and width of expression result for all rows, so PADR() is strongly recommended. Otherwise grid can show some weird behaviour.
>>>I think Dragan is referring to programmatically calculating an appropriate value for the column's width and then setting it to the new value like so:
>>
>>"Thisform.Grid1.Columns(1).Width = nSomeValue"
>>yes that did it, Not sure why I had to do this though.
>
>
>Fox is taking its best guess at what the contents of the column will be, based on the first record available when the grid is built. If you're having a calculated value there, you get what VFP thinks is enough. You may help it with surrounding the expression for the controlsource of 6th column with padr(expression, nn) where nn is any number you find sufficient. Whenever Fox needs to measure the width of something, preformatting helps.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.