Alternatively, you could categorise the items in the purchase and sell screens into a tree, and then use + and - buttons to show and hide categories, eg. personnel, crafts, craft weapons, (with a sub-category for craft ammunition) ordinance, (which could be sub-categorised into conventional, advanced and alien, with appropriate sub-sub-categories for ammunition) grenades, construction materials, (ie. UFO parts, alien alloys, and Elerium) and corpses. That allows hide/show behaviour while still following the same logical categories as the default ordering.
That could be overkill for the purchase screen, but I can see it being very useful for the sell and transfer screens.