Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multi column sorting in grid
Message
From
21/10/2011 00:25:40
 
 
To
20/10/2011 14:21:06
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01526657
Message ID:
01527022
Views:
74
>>Frank, what are you basically trying to do with the multi-sort grid? Find/pick a single item, or pull an ordered set?
>>
>
>Hi Mark,
>
>the user has already retrieved a data set using various search/filter creiteria, now they want to locate a particular record. My grid lets them sort by clicking on the grid header, but they want to sort by more than one column at a time, so I want to let them click on the first column, then use ctrl+click on another column to sort by the first column and then the second column and so on.

*************************
Perhaps the following might help your thinking --

Several years ago, I wrote an extensive app in FPW 2.6 to manage a car club (with about 1,000 members). One of the problems I solved was how to include a significant variety of members' cars in the database (several hundred permutations of year/make/model/series/customization/etc.) while,at the same time, enabling rapid, consistent input by the end-user. I accomplished this with a car-chart (table) of the permutations and a browse-pick routine (browse, for those whose memories do not go that far back, being a less-well-behaved predecessor to VFP's grid).

The read-only browse-picker is called via a button next to the textbox that is being filled in. Positioning the "cursor" (highlighted cell) on a column both sorts and enables incremental search on that column. Tabbing from one column to the next drills down (filters the browse) on that term. Back-tabbing "drills up" (un-filters). In this manner, the user can add as many terms to the filter as desired (and "back out" all or part-way by removing terms from the filter). Left-arrow and right-arrow move the "cursor" from one column to the next without drilling. Up-arrow and down-arrow move up or down one row. Enter selects the desired permutation (i.e., the row where the "cursor" is currently positioned) and exits the picker, while Esc exits the picker without making a selection.

I've been very pleased with how elegant a solution this has been for the end-user -- i.e., relatively few, intuitive keystrokes to make a pick based on multiple terms. I'm not advocating the use of a browse, of course -- but something comparable with a grid should be readily achievable.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform