The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Class: TReportListView
Declaration: function SetColumnOrder (ColList: array of integer): boolean;

The report listview component provides an option to display the columns of the string array of the listview in an order different to the actual storage order. The method SetColumnOrder allows to reorder the visible columns by defining a new display order. The display order is given by the open integer array ColList. ColList must have the same length as there are number of columns in the list view. SetColumnOrder returns a TRUE value if the reordering was successful.

Example: Assuming that the listview has 7 columns, calling SetColumnOrder([1,2,5,4,3,6,7]); exchanges the columns 3 and 5.

Hint: Please note that changing the column order affects only those properties which in some way are related to visual aspects. The actual storage position stays unchanged. Thus you have to access, for example, the data of column 11 as column 11 even if the displayed order is such that column 11 is displayed as column 3.

Last Update: 2016-Oct-02