Public oForm oForm = Createobject('myForm') oForm.Show Define Class myForm As Form DataSession = 2 Height=300 Width=300 Add Object myButton As CommandButton With Caption="Mark All" Add Object myGrid As Grid With Width=300,Height=200,Top=50 Procedure Load Create Cursor test (myLogical l, myValue c(10)) For ix=1 To 100 Insert Into test Values (Int(Rand()*100)%2 = 0, Sys(2015)) Endfor Locate Endproc Procedure Init With This.myGrid.Columns(1) .AddObject("mycheck","CheckBox") .CurrentControl = "myCheck" .Sparse=.F. .myCheck.Caption = '' .myCheck.Visible = .T. Endwith EndProc Procedure myButton.Click Update (thisform.myGrid.Recordsource) set myLogical= .t. thisform.myGrid.Refresh() endproc EnddefineCetin