I've manual pick problem for those checkbox layout in grid's first columns where there are all created in class object.
I'm able to picked success on first row, but it won't be appear when click on second row.
check box in entire column seem to be failed in random picked and unable to pick in identical for each row.
Coding :
define class chk_sel as checkbox
name = "chk_sel"
procedure init
this.value = 0
this.caption = ""
this.readonly = .f.
this.tabstop = .f.
endproc
enddefine
Define class frmpurc As Form
procedure init
For each frm in _screen.Forms
if frm.name == "MyForm"
select "" as pick,supcode,item_desc,inv_no,po_no,line,acc_qty, ;
taxcode,acc_amt,net_tax,gros_amt from purc ;
into cursor tmpcur ;
where alltrim(inv_no) = alltrim(this.txt_search.value)
If NOT USED('tmpcur_')
USE DBF("tmpcur") in 0 AGAIN alias tmpcur_
else
USE IN 'tmpcur_'
USE DBF("tmpcur") in 0 AGAIN alias tmpcur_
endif
sele tmpcur_
frm.grid_list.recordsource = SPACE(0)
frm.grid_list.recordsource = "tmpcur_"
frm.grid_list.deletemark = .f.
frm.grid_list.readonly = .f.
frm.grid_list.column1.width = 25
frm.grid_list.column1.bound = .f.
frm.grid_list.column1.controlsource = "tmpcur_.pick"
frm.grid_list.column1.readonly = .f.
frm.grid_list.column1.text1.visible = .t.
frm.grid_list.column1.removeobject("text1")
frm.grid_list.column1.addobject("pick","chk_sel")
frm.grid_list.column1.currentcontrol = "pick"
frm.grid_list.column1.pick.visible = .t.
frm.grid_list.column1.pick.readonly = .f.
frm.grid_list.column1.pick.tabstop = .t.
frm.grid_list.column1.sparse = .f.
endif
endfor
endpro
enddefine
Thanks anyone could help me to solve this.
I'm able to picked success on first row, but it won't be appear when click on second row.
check box in entire column seem to be failed in random picked and unable to pick in identical for each row.
Coding :
define class chk_sel as checkbox
name = "chk_sel"
procedure init
this.value = 0
this.caption = ""
this.readonly = .f.
this.tabstop = .f.
endproc
enddefine
Define class frmpurc As Form
procedure init
For each frm in _screen.Forms
if frm.name == "MyForm"
select "" as pick,supcode,item_desc,inv_no,po_no,line,acc_qty, ;
taxcode,acc_amt,net_tax,gros_amt from purc ;
into cursor tmpcur ;
where alltrim(inv_no) = alltrim(this.txt_search.value)
If NOT USED('tmpcur_')
USE DBF("tmpcur") in 0 AGAIN alias tmpcur_
else
USE IN 'tmpcur_'
USE DBF("tmpcur") in 0 AGAIN alias tmpcur_
endif
sele tmpcur_
frm.grid_list.recordsource = SPACE(0)
frm.grid_list.recordsource = "tmpcur_"
frm.grid_list.deletemark = .f.
frm.grid_list.readonly = .f.
frm.grid_list.column1.width = 25
frm.grid_list.column1.bound = .f.
frm.grid_list.column1.controlsource = "tmpcur_.pick"
frm.grid_list.column1.readonly = .f.
frm.grid_list.column1.text1.visible = .t.
frm.grid_list.column1.removeobject("text1")
frm.grid_list.column1.addobject("pick","chk_sel")
frm.grid_list.column1.currentcontrol = "pick"
frm.grid_list.column1.pick.visible = .t.
frm.grid_list.column1.pick.readonly = .f.
frm.grid_list.column1.pick.tabstop = .t.
frm.grid_list.column1.sparse = .f.
endif
endfor
endpro
enddefine
Thanks anyone could help me to solve this.