Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Making grid highlighting match the current record
Message
From
09/04/1998 13:36:17
 
 
To
09/04/1998 13:11:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00090597
Message ID:
00090856
Views:
30
>When I added the code you suggested (and took out the When event code), I got the following message (5 times which is the number of columns I have): "Expression invalid. Use a valid expression for DynamicBackColor property." Everything looks ok, when the grid first displays (i.e. it still shows the highlighting on the first column), but the error message displays as soon as I try to exit from the displayed first row and click on another row in the grid.
>
Following are Grid Snippets which are really tested and work Ok on my machine:
***Grid.Init event
ThisForm.r_nCurrentRow = RECNO(This.RecordSource)
This.Setall("DynamicBackColor", ;
"IIF(RECNO(This.Recordsource) = " + ;
"ThisForm.r_nCurrentRow, " + ;
"RGB(0,255,255), RGB(255,255,255))", ;
"Column")
***Grid.Afterrowcolchange event
LPARAMETERS nColIndex
thisform.r_nCurrentRow=RECNO(This.RecordSource)
this.refresh
Normally I don't use RECNO(This.RecordSource). I prefer RECNO("Table1"), etc., but I wanted to be close to your code and it really works.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform