Hi Peter.
>> Is there a way to tell which row in a grid is the CURRENT record programatically. I was thinking about
using a DYNAMIC for controlling the background color of each row so that the current row is a diff
color. <<
Add a property to your grid called nrecNo and initialize it to 0 in the property sheet. This code in the Init of your grid class:
This.nRecNo = RECNO( This.RecordSource )
This.SetAll( 'DynamicForeColor', ;
'IIF( RECNO( This.RecordSource ) = This.nRecNo, RGB( 0, 0, 128 ), RGB( 0, 0, 0 ) )', 'COLUMN' )
This.SetAll( 'DynamicBackColor', ;
'IIF( RECNO( This.RecordSource ) = This.nRecNo, RGB( 0,255,255 ), RGB( 255, 255, 255 ) )', 'COLUMN' )
This in the grid class's AfterRowColChange:
Thisform.LockScreen = .T.
WITH This
.nRecNo = RECNO( .RecordSource )
.Refresh()
ENDWITH
Thisform.LockScreen = .F.
Marcia