Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 3.0 - How Do You Make Grid Show Current Record
Message
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00098099
Message ID:
00098103
Views:
28
>As long as your incremental search textbox is searching the same table as displayed in the grid, place the following in the InteractiveChange method of the Incremental search textbox:
>  DoDefault()
>  ThisForm.GridName.Refresh()
>I use the DoDefault() because my IncSearch code is located in this method of my sub-class which I assume is the same for you.

Sorry, I see you already refresh grid. You can also add
ThisForm.LockScreen = .t.
ThisForm.GridName.SetFocus()               && This will mark the record.
do while thisform.gridname.relativerow>1   && This will scroll the selected
   thisform.gridname.doscroll(1)           && record to the first row in grid
enddo                                      && (this is optional code).
This.SetFocus()
ThisForm.LockScreen = .f.
I am writing this from memory (I do not have my code at my disposal right now). But this is general idea of what to do.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform