- Consequently use Mainform.GetRegValue() to read these values, an overloaded method with either Boolean, String or Integer result. These methods keep a global TRegistry object (regMain) open while the application runs, rather than creating a new one for each caller.
- Remove Mainform.SaveRegValue() which was used in one or two callers. Rather use a TRegistry object and do that by hand. There's no significant advantage in using a SaveRegValue method currently.
- Implement an alternative solution for handling sorted columns without usage of SMDBGrid's sortcolumns. Move relevant structures and functions from data_sorting.pas to childwin.pas and use them in both units.
- Upgrade some code parts to use WideStrings instead of Strings so they don't break with the new grid.
- Use Grid.OnDrawDataCell as an alternative to Grid.OnGetCellParams as the latter one is a feature of SMDBGrid
- Cosmetic: enhance screen real estate in viewdata()
Additionally/Sideeffects:
- Fix vstFreeNode to delete the item from the array, not only free the item itself
- Change/Rename GetSelectedNodesFromVT to GetVTCaptions and give it the ability to return all captions, not only the selected. This function is very useful now and saves writing much redundant code.
A table with 500 columns needed 3 seconds to display in the TSortListView, now that takes less than a half second.
This has one positive side effect: ViewData no longer re-saves an ORDERCLAUSE to registry after it has been read. At the same time the ORDERCLAUSE is read everytime when grid is filled, not only the first time. Those changes were needed to be able to apply an ORDERCLAUSE which was generated and saved by the new dialog.
Left for later: Moving order-columns up and down. Tested that with a TUpDown which seems to ignore clicks sometimes and then doesn't fire OnClick.