1. Use DynamicBackColor of grid column to define conditional background. For example, put line in Init of grid:
this.SetAll("DynamicBackColor","iif(MyCursor.lError, RGB(255,0,0), RGB(255,255,255)")
where lError is logical field. In this sample lines in grid will be red when lError field in grid cursor equal .T.
This expression will be calculated for all rows, so avoid slow functions and User-Defined functions. When you refer grid objects from this expression, scope of references is grid ('this' will refer to grid object, not to column).
To refresh such highlighting after changes in data, use Refresh method of grid.
2. First of all, assure that you was not left tracing on some code line of form. Use cancel command for that. When not help (in some rare cases object references corrupted), use CLEAR ALL.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.