Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date/Datetime in grid problem
Message
From
10/02/2000 14:06:45
 
 
To
09/02/2000 08:53:00
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00329365
Message ID:
00330222
Views:
26
>Hi again,
>
>Not much luck with responses to this yesterday, so I thought I'd try again today.
>
>I am using SQL server so all my dates get returned as datetime values. I am only interested in the date portion. For forms, I have created a class that handles this well - puts the TTOD() value in the textbox at refresh and updates the datetime field in valid() - works fine. HOWEVER - I am struggling with how to handle this in a grid. My class won't display anything there.
>
>I want the grid to SHOW ONLY date portion of value, be updatable, and only allow DATE portion to be entered. If I set column source to TTOD(myfield), the column becomes read-only - if I set the column to myfield and the individual textbox to TTOD(myfield), I still get the whole darn datetime value in the box! How are others handling this? what's the secret?
>

Why not put a textbox in the as the control, and play around a bit. Create a custom property of the textbox, a date property, Have that property updated with the TTOD() of the field specified in the Column's ControlSource as apprpriate. Let the user edit in the property, and in the valid, write the DTOT() of the property back to the field.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform