Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Column Format
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00088281
Message ID:
00088299
Views:
28
>Sawadee Kahp,
>
> I have a request to format the date in a grid column to the return value of DTOC(). ie. February 12, 1998. If I am loading the recordsource of the grid in the Init event of the form, is it possible to reformat each row in the grid? It seems to only operate on the first record. Do I need to scan the table and modify the column text value?
>
>Eric K.

Easiest (if data is not modified on the form) is to REPLACE ALL in the form init.
Maybe better way is to create a form method that returns the word date from a passed date, and make the function the controlsource of the grid.

grid1.column1.controlsource = "thisform.chardate(somedate)"

form1.chardate
lparameters indate
outdate = cmonth(indate) + " " + alltrim(str(day(indate))) + ", " + alltrim(str(year(indate)))
return outdate
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform