Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public oForm
oForm=Createobject("form1")
oForm.AddObject("grid1","grid1")
oForm.Show(1)
Define Class grid1 As Grid
DeleteMark = .F.
ColumnCount = 5
PROCEDURE BeforeRowColChange
Lparameters nColIndex
thisform.lockscreen = .t.
ENDPROC
Procedure AfterRowColChange
Lparameters nColIndex
Local i
With This
If .Columns(1).ColumnOrder < .LeftColumn
For i=.Columns(1).ColumnOrder To .LeftColumn-1
.Columns(1).ColumnOrder = .Columns(1).ColumnOrder + 1
Endfor
Else
For i=.LeftColumn+1 To .Columns(1).ColumnOrder
.Columns(1).ColumnOrder = .Columns(1).ColumnOrder - 1
Endfor
ENDIF
.Refresh()
ENDWITH
thisform.lockscreen = .f.
Endproc
Procedure Init
With This
.Columns(1).BackColor = Rgb(255,0,0)
For i = 1 To .ColumnCount
.Columns(i).header1.Caption=Justext(.Columns(i).ControlSource) && Line will not work in VFP5.0
Endfor
Endwith
This.RecordSource="myGridCursor"
Endproc
Visible = .T.
Enddefine
Define Class form1 As Form
Procedure Init
Create Cursor myGridCursor (date1 D,Name c(20),address c(20),phone c(12),zip c(10))
Insert Into myGridCursor (date1,Name,address,phone,zip) Values (Date(),"Mike","123 nowhere","1-800-555-5555","123432")
Insert Into myGridCursor (date1,Name,address,phone,zip) Values (Date()+1,"Paul","321 somewhere","1-800-555-6543","0978675")
Insert Into myGridCursor (date1,Name,address,phone,zip) Values (Date()+3,"John","765 Here","1-800-555-3214","9587464")
Go Top
Endproc
Enddefine