Mike Yearwood
Toronto, Ontario, Canada
General information
Category:
Forms & Form designer
I wrote a long Foxpro Advisor article about this I think it was June 1997. Basically the grid is trying to fill its display area. When it can't it doesn't just respect the filter like a browse does, it seems to try to find records the hard way.
You have a few options. If you are not permitting the user to re-order the data in the grid, try set key. Assuming you have a customer list with a cus_name field and a cus_name index, do this...
lcFilter = "SMITH"
SET KEY TO lcFilter,lcFilter
This will show all the "smiths" in the grid.
If you want to provide different sorts things get ugly with set key. Example: try to provide sort on lastname,firstname and lastname,postal code but now you cannot filter on postal code unless you also provide an index tag postalcode+lastname.
The most flexible answer is to use a view. You can bring down only the records the user wants, and you can either sort the data or index the cursor.
HTH
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only