I try to use the Arnon Gal-oz's Tip about color in grid.
I have a grid and an entry field for a rapid search in the grid like in FoxPro help dialog box (by index).
The search and reposition in the grid work but I have always the same error.
"Expression is invalid. Use a valid expression for DYNAMICBACKCOLOR (or DYNAMICFORECOLOR) property".
The follow lines are the code I use :
In a method ColorLine()
WITH ThisForm
.gdGrid.SetAll("dynamicbackcolor", "IIF(RECNO() = .nRecno, .GridBackColor, .gdGrid.BackColor)", "Column")
.gdGrid.SetAll("dynamicforecolor", "IIF(RECNO() = .nRecno, .GridForeColor, .gdGrid.ForeColor)", "Column")
.gdGrid.Refresh()
ENDWITH
In the Form.Init()
WITH ThisForm
.GridBackColor = .gdGrid.column1.text1.SelectedBackColor
.GridForeColor = .gdGrid.column1.text1.SelectedForeColor
ENDWITH
I tried to store the result of GetColor() in GridBackColor and GridForeColor and the same error occurs.
nRecno is an property of ThisForm who contains the last recno() found
Thank for your help.
Stephan