I have defined a grid programatically, as shown below. I am getting my data from an SQL server using SQLEXEC to pass my selection statement and create a cursor object.
My problem is with the checkbox column. It displays the proper state based on the logical field that it is attached to, but it is like the control is readonly. I can not click it to change the state.
Do I have to write a click event to set the field? If so, how is this done?
Thisform.Grid1.RecordSource = "EscTickets"
Thisform.Grid1.ColumnCount = 18
Thisform.Grid1.Column1.Header1.Caption = "Marked"
Thisform.Grid1.Column1.ControlSource = "selected"
Thisform.Grid1.Column1.AddObject("checkbox1","checkbox"
Thisform.Grid1.column1.Checkbox1.Caption = ""
Thisform.Grid1.Column1.CurrentControl = "checkbox1"
Thisform.Grid1.Column1.Width = 50
Thisform.Grid1.Column1.Text1.Visible = .f.
Thisform.Grid1.Column1.RemoveObject('Text1')
Thisform.Grid1.Column1.Sparse = .f.
Thisform.Grid1.Column1.Checkbox1.Enabled = .t.
My problem is with the checkbox column. It displays the proper state based on the logical field that it is attached to, but it is like the control is readonly. I can not click it to change the state.
Do I have to write a click event to set the field? If so, how is this done?
Thisform.Grid1.RecordSource = "EscTickets"
Thisform.Grid1.ColumnCount = 18
Thisform.Grid1.Column1.Header1.Caption = "Marked"
Thisform.Grid1.Column1.ControlSource = "selected"
Thisform.Grid1.Column1.AddObject("checkbox1","checkbox"
Thisform.Grid1.column1.Checkbox1.Caption = ""
Thisform.Grid1.Column1.CurrentControl = "checkbox1"
Thisform.Grid1.Column1.Width = 50
Thisform.Grid1.Column1.Text1.Visible = .f.
Thisform.Grid1.Column1.RemoveObject('Text1')
Thisform.Grid1.Column1.Sparse = .f.
Thisform.Grid1.Column1.Checkbox1.Enabled = .t.