Koen Piller
Programmer
Hi,
I have created a dynamic grid with first column a checkbox with following code:
grid init:
&& to enable dynamic grid sorting functionality
now when running a form with this Grid, the checkbox value cannot be changed and remains as is.
I have added in "afterRowColChange"
and the checkbox's value can be changed.
However I dont seem to be able to figure out how to change this coding for rightclick - to enable the enduser to change all the checkboxes from .f. to .t. i.o.w. to select everything. Any ideas are welcome
Jockey2
I have created a dynamic grid with first column a checkbox with following code:
grid init:
&& to enable dynamic grid sorting functionality
Code:
for each loColumn in this.Columns
for each loControl in loColumn.Controls
if lower(loControl.Baseclass)='header'
bindevent(loControl,'Click',this,'cSortField')
endif
endfor
endfor
with this.Column1
.RemoveObject('Text1')
.AddObject('chkBox','grdchkBox') &&checkbox with some functionality from my 'GrdchkBox' Class
.CurrentControl = 'chkBox'
.ControlSource = 'lSelect' &&a logical field from my cursor
.Sparse = .f.
.Enabled = .t.
endwith
I have added in "afterRowColChange"
Code:
with thisform.myGrid1
if .ActiveColumn = 1
lValue = .Column1.chkBox.Value
.Column1.chkBox.value = !lValue
endif
endwith
and the checkbox's value can be changed.
However I dont seem to be able to figure out how to change this coding for rightclick - to enable the enduser to change all the checkboxes from .f. to .t. i.o.w. to select everything. Any ideas are welcome
Jockey2