Frequently Asked Component Specific Questions

Options

Display all FAQ items

Search FAQ items:


Displaying items 1 to 1 of 1, page 1 of 1

<< previous next >>

TAdvStringGrid
I am having problems with the sorting order of special characters in other languages

Please specify the ssAnsiAlphaCase sort type with following event handler:

procedure TForm18.AdvStringGrid1GetFormat(Sender: TObject; ACol: Integer;var AStyle: TSortStyle; var aPrefix, aSuffix: string); 
begin
  AStyle := ssAnsiAlphaCase;
end;

The OnGetFormat event is used to instruct the grid which compare method it should use during the sorts for each column in the grid. By default, the grid is using an automatic format guess. Although this auto format guess can be convenient, for sorting large and complex amounts of data it is not recommended. When mixed numeric and alphabetic data is available in a column, this auto format guess is easily confused and the extra checks for guessing the format take extra time. With the OnGetFormat event, the compare methods to use can be specified for each column.

This is also explained at page 19 of the TAdvStringGrid Developers Guide.