Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Generating Grid
Message
 
À
31/08/2002 23:00:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00695743
Message ID:
00695756
Vues:
24
This message has been marked as the solution to the initial question of the thread.
>Can anyone tell me how I can generate a grid based on the days of a month given a start date. If I start counting from August 12th, I need a grid that will lay out all the work days of the month of august and give me the number of the columns to match the number of work days in that month.

If I understood you need a code like this:
local MyStartDate, CurrentGridColumnCount
LastDayOfMonth = GoMonth(date(year(MyStartDate), month(MyStartDate), 1),1) - 1
For CurrentDay = MyStartDate to LastDayOfMonth
	If !InList(Dow(CurrentDay), 6, 7)
		CurrentGridColumnCount = CurrentGridColumnCount + 1
		MyGrid.AddColumn(CurrentGridColumnCount)
		MyGrid.Columns(CurrentGridColumnCount).Header1.Caption = Transform(CurrentDay)
		* place here all your setting
	endif
EndFor
I hope this also answers your previous question about number of days in a month.
Venelina Jordanova

Outsourcing IT Services Ltd.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform