📅  最后修改于: 2022-03-11 14:57:17.144000             🧑  作者: Mango
// Use this if you need find and select an item from a grid on vfp 9
// Make sure you put the right name of the textbox, the grid, and the column
//your'e searching for :)
PRIVATE strItem
STORE THISFORM.TEXTBOX.Value to strItem
SELECT (THISFORM.Grid1.RecordSource)
LOCATE FOR yourcolumn = strItem
IF FOUND() = .T.
THISFORM.Grid1.SetFocus
ENDIF