Contents - Index - Previous - Next


Sort method



Applies to
TProfGrid component

Declaration
function Sort: Boolean;

Description

Sorts the scrollable rows of the grid using the current settings of SortColumn and SortDescending properties.

Returns True on success. Returns False if an exception has occurred.

Tip:  The grid never changes the order of rows that contain equal values. Thus, if you need to programmatically sort the grid on two or more columns, just sort that two or several columns in reverse order, for example:
  ProfGrid1.SortColumn := 2;
  ProfGrid1.Sort;
  ProfGrid1.SortColumn := 1;
  ProfGrid1.Sort;