I lose the DynamicBackColor for some rows of a grid due to the addition of code in the WHEN clause of a combobox in the gridcolumn.
In a form's INIT, i have the following to color this a grid column for a few particular grid rows:
THISFORM.GrdTime.Column1.DynamicBackColor = "IIF( BETWEEN(tmptime.projfk,6,11), RGB(215,255,215), RGB(255,255,255))"
I also need to makes these same rows readonly. In the WHEN clause of the gridcolumn's Combobox, i have the following:
l_return = .t.
SELECT tmptime
IF BETWEEN(tmptime.projfk,6,11)
l_return = .f.
ENDIF
RETURN l_return
This works fine with regard to being keeping the particular row cells readonly.
The problem is that after i click on the combobox in column1 of the grid (cant change the value... which is good), the background turns white.
I have tried placing the same "DynamicBackColor" command in the CLICK and LOSTFOCUS methods of the combo to turn back on the coloring of the row cells, without luck. Row colors remain white.
If i comment out the code in the WHEN (and just RETURN), the color stays but the combo is no longer readonly.
Any ideas?