I'm trying to add a code to the 'lostfocus' event of 'grid1.column4.text1' at runtime.
anybody pls help me to accomplish this..
thanks
*****************************************
Dimension cpt(1,4) && Captions
cpt(1,1)="File #"
cpt(1,2)="Name"
cpt(1,3)="Type "
cpt(1,4)="Amount "
Thisform.grid1.ColumnCount=4
For i=1 To Alen(cpt)
col_no=Alltrim(Str(i))
Capt="column&col_no"+".Header1.caption"
Thisform.grid1.&Capt=cpt(1,i)
Endfor
Thisform.grid1.column1.ReadOnly=.T.
Thisform.grid1.column2.ReadOnly=.T.
Thisform.grid1.column3.ReadOnly=.T.
Thisform.grid1.column2.Width=250
****Start lostfocus event***
&&& Help Me..
***End LostFocus Event****
mmm=SQLExec(hr_handle,"select (select emp_file from emp_master where emp_master.emp_id=pay_allowance_reg.emp_id) emp_file,"+;
"(select emp_name from emp_master where emp_master.emp_id=pay_allowance_reg.emp_id) emp_name,"+;
"(CASE WHEN allow_id=0 THEN 'OT' else case when allow_id=1 then 'Others' END END) allow_id_str,amount,"+;
"allow_id,emp_id,_month,_year,v_no FROM pay_allowance_reg "+;
"WHERE FLAGS=1 OR FLAGS=3",'Pay_entry')
If mmm>0
If Recno()>0
Thisform.grid1.RecordSource='pay_entry'
Endif
Endif
**********/////**************
anybody pls help me to accomplish this..
thanks
*****************************************
Dimension cpt(1,4) && Captions
cpt(1,1)="File #"
cpt(1,2)="Name"
cpt(1,3)="Type "
cpt(1,4)="Amount "
Thisform.grid1.ColumnCount=4
For i=1 To Alen(cpt)
col_no=Alltrim(Str(i))
Capt="column&col_no"+".Header1.caption"
Thisform.grid1.&Capt=cpt(1,i)
Endfor
Thisform.grid1.column1.ReadOnly=.T.
Thisform.grid1.column2.ReadOnly=.T.
Thisform.grid1.column3.ReadOnly=.T.
Thisform.grid1.column2.Width=250
****Start lostfocus event***
&&& Help Me..
***End LostFocus Event****
mmm=SQLExec(hr_handle,"select (select emp_file from emp_master where emp_master.emp_id=pay_allowance_reg.emp_id) emp_file,"+;
"(select emp_name from emp_master where emp_master.emp_id=pay_allowance_reg.emp_id) emp_name,"+;
"(CASE WHEN allow_id=0 THEN 'OT' else case when allow_id=1 then 'Others' END END) allow_id_str,amount,"+;
"allow_id,emp_id,_month,_year,v_no FROM pay_allowance_reg "+;
"WHERE FLAGS=1 OR FLAGS=3",'Pay_entry')
If mmm>0
If Recno()>0
Thisform.grid1.RecordSource='pay_entry'
Endif
Endif
**********/////**************