Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refreshing form
Message
From
28/04/2009 15:51:17
 
 
To
28/04/2009 15:23:20
Fabian Borghi
Xenon Information Technology
Itaparica, Brazil
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01396794
Message ID:
01396805
Views:
57
>Just This....
>
>OPEN DATABASE ".\dados\restaurant" shared
>SELECT codigo,garcom FROM mesas INTO CURSOR openmesas WHERE status = .t.
>thisform.grid1.RecordSource="openmesas"
>
>thisform.grid1.column1.Width= 40
>thisform.grid1.column2.Width= 110
>thisform.grid1.column1.text1.Click

When you set grid.recordsource your grid automatically 'rebuilds itself' losing all customization. You may consider doing it differently. Create empty cursor in Form.Load event and assign it as Grid.recordsource in Grid.Init event, assigning all column.controlsources after it. When it is done, use Insert... Select command in Form.Init event keeping grid properties intact:
Insert Into openmesas (garcom) Select gracom From mesas Where status=.T.
Go Top In openmesas
This.Grid1.Setfocus
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform