I am using these commands to color the current row and alternate the color in 1 column of a data grid:
with thisform.grid1
.nRecNo=recno('pdfs') .setall('dynamicbackcolor','iif(recno(this.recordsource)=this.nRecNO,rgb(192,192,192),rgb(255,255,255))','column')
.column4.dynamicbackcolor='iif(mod(thisform.grid1.activerow,2)=1,rgb(255,255,0),rgb(255,128,192))'
.SetFocus()
endwith
The reason I am using Thisform.grid1.activerow to set the dynamicbackcolor rather than the .nRecNo property is that this data is not in recno order and cannot easily be made to be in recno order.
All works well until the user clicks to do a page down on the scroll bar. Column4 then becomes 1 color and stays so until the user either clicks on the grid or does a key event to move the record pointer in the grid.
I have put the .column4.dynamicbackcolor line of code in the grids scrolled event, but no joy.
Any suggestions?
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!