Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best place to hold the current RECNO()
Message
From
13/07/2001 19:24:17
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00530542
Message ID:
00530548
Views:
14
>>Assuming I have a grid on a form. That grid contains a property nCurrentRec. That holds the current recno. Where in the grid should I put the This.nCurrentRec=RECNO() to initialize that updated value?
>>
>>I have this in the Init():
>>
>>
>>This.SetAll('DynamicBackColor','IIF(RECNO()=This.nCurrRec,;
>> RGB(0,0,128),This.BackColor)','Column')
>>This.SetAll('DynamicForeColor','IIF(RECNO()=This.nCurrRec,;
>> RGB(255,255,255),This.ForeColor)','Column')
>>
>>
>>Basically, it serves to highlight the current record. We had this for a while in our framework. Then, for some kind of reason, we have removed that initialization. It just can't seem to find the proper place to have that working.
>
>IMO, the AfterRowColChange event (or a method called from there).

If I have this in the AfterRowColChange() event:
LPARAMETERS nColIndex

IF NOT DODEFAULT()
   RETURN .F.
ENDIF

This.nCurrRec=RECNO()
combined with the above code in the Init(), it doesn't work.

The line that gets highlighted is the previous record.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform