I have a grid in my program that display an information in sorted and the moment I click any data within the first colum of my grid it automatically display all information in the corresponding objects within the form. What i want to do next is, if ever the focus within the grid and i type the first letter of the record which i want to find it would highlight the record that starts with the character i enter within the grid and follows the 2nd, 3rd and so on. until such time i can right away view the record which i want to find. Thanks...

Re: Using grid


You can:

1) Use 3rd party classes like FoxyClasses

2) Create your own using something like Qickfill, InGrid classes that are in public domain (you can download from

3) Create your own subclassing textbox to use in grid or put textboxes over grid that would show info on grid. ie:

Public oForm
oForm = Createobject('myForm')

Define Class myForm As Form
DataSession = 2
Top = 0
Left = 0
Height = 400
Width = 750
Caption = "Search Test"

Add Object lblSearch As Label With ;
Left = 5, Top = 5,Width=60,Caption='Company'
Add Object txtSearch As TextBox With ;
Left = 70, Top = 5
Add Object myGrid As Grid With ;
Height = 300, Width = 750, Top=30

Procedure Init
With This.myGrid
.RecordSource = "select * from customer "+;
" where UPPER(company) = UPPER(TRIM(thisform.txtSearch.Value))"+;
" into cursor crsCustomer"

Procedure txtSearch.Interactivechange
With This.Parent.myGrid
.RecordSource = .RecordSource

Re: Using grid

Carl Warner

Take a look at Les Pinter's online article that includes incremental searching in a grid:

Workhorse Grids ArtNum=239


Re: Using grid

Louie Angelo Guirigay

thanks to you guys but i dont want to use another object like textboxes or label just to accept data i typed. What i want is, the moment my form is running and the focus is on the grid and the moment i type the first letter of the record it will automatically highlight the first recrod with the first character i entered within the grid.

BTW were i can find the keyfield property of the form i didn't see any keyfield in the property window of the form.