Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Text
Message
De
13/05/1999 14:06:22
 
 
À
13/05/1999 13:45:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00218501
Message ID:
00218516
Vues:
18
>I've have a grid that displays 3 fields:
>
>Description Due Date Completion Date
>
>I've created a method that calculates the number of days 'til the completion date. I'd like to fire that method for every record in the grid. Where would I call the method from? On init of page or THISFORM.Grid1.Column3.Text1?? And how can I determine what row I'm in on the grid, I'd like to change the color of the grid line of the selected record.
>
>TIA!
>
>/Chris

Chris,

Another way you could do what you're after would be to drive your grid from a view, and put the calculations in the SQL code for the view. If you don't need to persist the data, that would allow you to quickly perform those calculations on the table as you open the view.

To get the best of both worlds, you could create a procedure file (To keep this strictly FoxPro) and call the user defined function to perform those calculations.

For example,

Set Procedure To myProcedureFile

Select description as description, ;
CalcDueDate() As DueDate, ;
From mytable ;
Into Cursor curMyResults

By creating a view, you make it easier to manage in a grid and handle updating the original table.

Regards,

Jason
Jason Tryon
Senior Systems Analyst / Technical Lead
eBusiness / iPage
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform