Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filtered Grids
Message
From
30/05/2001 11:19:45
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
29/05/2001 13:50:45
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00512317
Message ID:
00512692
Views:
9
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
Map
View

Click here to load this message in the networking platform