>I am experencing the following problem on a VFP 5 project. When the checkbox is added to the grid it behaves as if it is "readonly". Without the checkbox the column is writeable. I have tried many different sequences of property settings without achieving a solution. Any ideas?
>TYIA,
>Robert Baker
>
>select .f. as lbill,fldb from table into cursor cur1
>USE DBF("cur1") IN 0 AGAIN ALIAS cur2
>with thisformset.frmA.grdA
> .recordsource = 'cur2'
> .readonly = .f.
> .columncount = 2
> .Column1.controlsource = 'Cur2.lbill'
> .Column1.readonly = .f.
> .Column1.AddObject('zcb','checkbox')
> .Column1.zcb.caption = ''
> .Column1.sparse = .f.
> .Column1.CurrentControl = 'zcb'
> .Column1.header1.alignment = 2
> .Column1.header1.caption = 'Bill'
> .Column1.header1.FontBold = .t.
> .Column1.width = 32
>
> .Column2.controlsource = 'Cur2.fldb'
> .Column2.header1.alignment = 2
> .Column2.header1.caption = 'ID'
> .Column2.header1.FontBold = .t.
> .Column2.readonly = .t.
> .Column2.width = 50
>endwith
Hi,
Missing piece is a visible = .t. after addobject.
>select .f. as lbill,fldb from table into cursor cur1
USE DBF("cur1") IN 0 AGAIN ALIAS cur2
with thisformset.frmA.grdA
.recordsource = ""
.columncount = -1
.recordsource = 'cur2'
with .columns(1)
.AddObject('zcb','checkbox')
.zcb.caption = ''
.zcb.visible = .t.
.sparse = .f.
with .header1
.alignment = 2
.caption = 'Bill'
.FontBold = .t.
endwith
.width = 32
endwith
with .columns(2).header1
.alignment = 2
.caption = 'ID'
.FontBold = .t.
endwith
.Columns(2).width = 50
endwith
Cetin