Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Datetime in Grid
Message
 
 
À
13/02/2001 15:57:30
Sammy Derban
Ghana Telecom
Accra, Ghana
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00475464
Message ID:
00475606
Vues:
36
What exactly you want:
- to display datetime field in grid in strict date format
OR
- to allow users to enter datetime field in grid, but it requires strict date?
Mayne both?

In the first case you can use exoression in the ControlSource property of the column that will convert datetime field content into character string in the format you need *you can yse for this such functions as day(), month(), year(), ..., str() etc.)

In the scond case just use 'SET STRICTDATE 0' and allow users to enter dattimes in as comfortable way as VFP provides by default. If you want to provide your own formatting for datetime field, for grids it is not easy. You will need to handle a lot of functionality in the textbox in grid, do not bind text box to data, change Value property to be character by default, specify Format and InpurMask properties to pre-format user input, convert string from user input into datetime value in the interactivechange or valid event and save it into data field, finally, read value from field and put it in the textbox value.

>Hello all,
>Can someone help me with specifying datetime in a grid with strict date entry.
>Thank you.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform