Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Not Behaving as Expected
Message
From
30/07/2002 07:44:49
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00683753
Message ID:
00683855
Views:
24
This message has been marked as the solution to the initial question of the thread.
Instead of trying to use the grid rows/columns, try using the alias itself. This seems to work ok:
LPARAMETERS nKeyCode, nShiftAltCtrl
Local lcAlias
lcAlias = This.Parent.Parent.RecordSource   && or thisform.vgrid2.recordsource if you like
IF nKeyCode = 13 
    NODEFAULT
    If !Eof(lcAlias)
        Skip in (lcAlias)
    Endif
ENDIF
Alan

>I'm tring to add a behavior to a grid where when enter is pressed the active row in moved down by 1 while staying on the same column
>
>The problem I'm having is very strange
>
>On the Keypress Event of the control on the column I'm interested in introducing this behavior to I have the following code
>
>LPARAMETERS nKeyCode, nShiftAltCtrl
>
>IF nKeyCode = 13
>
> NODEFAULT
> thisform.vgrid2.ActivateCell(thisform.vgrid2.ActiveRow+1,;
> thisform.vgrid2.ActiveColumn)
>
>ENDIF
>
>It seems pretty simple... The problem is It works fine for about 15 or so records and then stops working.. Trided a few diffrent data sets and had the same problem.. If i use the scroll bar the behavior becomes even more eratic sometimes skiping several rows down. I placed watches on the rows and colums. It all seems to look fine for the first few enters then just stops working or eraticaly
>
>thanks in advance for your advice
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform