TAdvStringGrid
Example 37 : sorting on selected fixed rows of choice

To allow another row to trigger and show sorts of columns, set the new grid.SortSettings.Row property to the row of choice. Note that this must be a fixed row.
Further, the cell alignment in this sample is set by the following OnGetAlignment event handler:
procedure TForm1.AdvStringGrid1GetAlignment(Sender: TObject; ARow, ACol: Integer; var HAlign: TAlignment; var VAlign: TVAlignment); begin if ARow > 1 then begin if odd(ARow) then else VAlign := vtaBottom; if odd(ACol) then else HAlign := taRightJustify; end; end;
Delphi project & source files for downloading included in the main demos distribution for Delphi.
×