Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to sort the records in the Grid
Message
From
22/07/2003 11:26:01
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
22/07/2003 11:18:59
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00812380
Message ID:
00812386
Views:
10
>When we use the grid on the VFP forms. at the runtime if we keep the mouse pointer on the header of the grid we will see a downward arrow but if we click on the column header of the grid how to sort all the records like in excel and access. (Like ascending or descending.)
>
>Is it possible.
>
>Thank you very much.

Yes, the Visual Extend framework does it, for instance. (Actually, they decided to use double-click for sorting). Visual Extend even allows sorting on more than one column. You can get a demo application from their Web-site.

It is probably lots of work to implement this yourself. The basic idea, however, is to intercept the Column.Header.Click() (or DoubleClick()) Event.

Use SET ORDER to activate a specific index.

If an index doesn't exist, you can create a temporary index with:

INDEX ON (expression) TO (temp-file-name)

For temporary filenames, see function sys(2015).

Note that indexing can be slow on large tables.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform