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....



OnBeforeSortExchange


Unit:SDL_replist
Class: TReportListView
Declaration: property OnBeforeSortExchange: TBeforeSortExchgEvent;
{ TBeforeSortExchgEvent = procedure (Sender: TObject; InString: string; var OutString: string) of object; }

The OnBeforeSortExchange event is generated immediately before the decision whether two rows or two columns of a string array are to be exchanged. This event is triggered twice per sorting operation (for each of the two strings to be compared).

In order to influence the sorting order, the variable parameter OutString has to be a transformed version of InString. Please note that the OutString is solely used for the sorting comparison, the actual string of the string array is left unchanged.

Example: You may change the sorting order of umlauts (e.g. the German 'ä') by replacing the umlauts by their vowel equivalents (e.g. 'ae' instead of 'ä'). This way any words starting with 'ä' are sorted within the range of words starting with the letter 'a' (instead of being appended at the end of the alphabet);



Last Update: 2012-Oct-20