Hi all,
I have this grid as you can see, in the below code and besides that i am highlighting the whole record for the condition exposed in the code, also would like to highlight two columns, those are QTYORD AND QTYREC.
also wouldl like to know if can select the column ItemNo and be able to open a txtbox there to search for an specific value under that column and refresh the grif and move to that record in the grid ?
I know i am asking two question in one, please help, as you can Thanks in advance.
are these two lines correct to obtain what i was asking about coloring the two columns if the condition is true ?
.Column3.DynamicForeColor= "IIF(resuls2.qtyord= resuls2.qtyrec, RGB(255,0,0),RGB(0,0,0))"
.Column4.DynamicForeColor= "IIF(resuls2.qtyord= resuls2.qtyrec, RGB(255,0,0),RGB(0,0,0))"
Thanks
I have this grid as you can see, in the below code and besides that i am highlighting the whole record for the condition exposed in the code, also would like to highlight two columns, those are QTYORD AND QTYREC.
also wouldl like to know if can select the column ItemNo and be able to open a txtbox there to search for an specific value under that column and refresh the grif and move to that record in the grid ?
I know i am asking two question in one, please help, as you can Thanks in advance.
Code:
Select ball_no, Sheet, QTYORD, QTYREC, PRC, ItemNo, vendorpartno, ;
descrip, Recdate, purno;
From RESULS1 ORDER BY 1 INTO Cursor RESULS2
If _Tally > 0
With Thisform.grid2
.Visible = .T.
.ColumnCount = -1
.RecordSource = 'resuls2'
.Refresh()
.Setall("DynamicBackColor", "IIF(resuls2.qtyord = resuls2.qtyrec, RGB(255,255, 0), 0xFFFFFF)") && yellow
.Column3.DynamicForeColor= "IIF(resuls2.qtyord= resuls2.qtyrec, RGB(255,0,0),RGB(0,0,0))"
.Column4.DynamicForeColor= "IIF(resuls2.qtyord= resuls2.qtyrec, RGB(255,0,0),RGB(0,0,0))"
ENDWITH
are these two lines correct to obtain what i was asking about coloring the two columns if the condition is true ?
.Column3.DynamicForeColor= "IIF(resuls2.qtyord= resuls2.qtyrec, RGB(255,0,0),RGB(0,0,0))"
.Column4.DynamicForeColor= "IIF(resuls2.qtyord= resuls2.qtyrec, RGB(255,0,0),RGB(0,0,0))"
Thanks