Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SKIP method in a GRID control
Message
From
31/07/1999 16:00:18
 
 
To
31/07/1999 15:42:47
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00248579
Message ID:
00248584
Views:
12
>>>>I would like to advance the record pointer in a grid control without setting focus to it by calling it's skip method (one we will build) what is my approach?
>>>
>>>So that I understand. You want to skip in the file, but also move the grid to show the next record at the top but not set focus to the grid?
>>
>>OK, more specifically, my main application has a grid control that navigates a set of records. A button on main application toolbar launches another form with detailed information of the selected grid record. I have previous and next buttons on the detail form and would like them to control the grid. The record source of the grid is dynamic so the method must remain generic...
>
>Ok, I just ran a quick test. With two forms open as long as you have a reference to the form you should be able to do what you want.
>
>In the method you could have something simple like
>
>
>LPARAMETERS tcDirection
>IF tcDirection = "UP"
>   THISFORM.Grid.DoScroll( 0 )
>ELSE
>   THISFORM.Grid.DoScroll( 1 )
>ENDIF
>
>
>In this example, I'm using a default data session in the second form so there both accessing the same data. Therefore there is no need to skip in the main form with the grid. You only need to scroll the grid. Also the method I added was to the form itself, but obviously you'll probably want to add the method to your grid's subclass.
>
>HTH

Dan,

Thanks for your time -

I am looking to advance the record pointer in the grid - scroll just scrolls the grid viewport. I may have to set focus to the grid to do what I want. I was trying to avoid setting focus to the grid because the child form disappears briefly - maybe I could fiddle with alwaysontop. If you think of anything let me know and again thanks for your thoughts!

...tim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform