Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using date in grid
Message
From
03/01/2001 08:58:59
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00458857
Message ID:
00458873
Views:
21
Hi,

If you are using any functions in the column ControlSource for that datetime field such as TTOD or TTOC you won't be able to update that field on the grid. If this is the case you can either use the datetime field without the funtion and you will be able to update the grid (it will display the time portion on the grid as well) or you could remove that field from the grid and put it in a textbox on the form with the textbox ControlSource being a form variable that is updated with the current cursor value and refreshed at each rowchange. If a user enters a new value in the textbox the LostFocus method could update the cursor.

replace cursor1.dtfield with DTOT(this.value)
The time will be filled in as 12:00 AM.

HTH

Bill

>I am working with the grid and populating the grid with a read/write
>cursor. There is a date/time field in my cursor. I am populating the value on
>the grid with the values from the cursor. When I am updating the date field I
>get an error message that "this is a read-only field". I know the grid itself
>is not a read-only because I can update other fields. My cursor is also
>read/write. How can I update a date/time field on the grid that will update
>my cursor without getting an error. Is this because I am entering a date, and it is expecting datetime?
Bill Leber
Previous
Reply
Map
View

Click here to load this message in the networking platform