TAdvStringGrid
Example 18 : using custom sort sequences

AdvStringGrid.SortIndexes.Clear; //clear any previous sequences AdvStringGrid.SortIndexes.Add(2); //set primary sort column AdvStringGrid.SortIndexes.Add(5); //set secondary sort column AdvStringGrid.SortIndexes.Add(1); //set third sort column
The routine in the sample application, to select a few custom sort sequences results in:
procedure TForm1.sortgroupClick(Sender: TObject); begin case sortgroup.itemindex of 0:begin advstringgrid1.QSort; end; 1:begin advstringgrid1.SortIndexes.Clear; advstringgrid1.SortIndexes.Add(5); advstringgrid1.SortIndexes.Add(7); advstringgrid1.SortIndexes.Add(1); advstringgrid1.QSortIndexed; end; 2:begin advstringgrid1.SortIndexes.Clear; advstringgrid1.SortIndexes.Add(4); advstringgrid1.SortIndexes.Add(6); advstringgrid1.SortIndexes.Add(3); advstringgrid1.QSortIndexed; end; 3:begin advstringgrid1.SortIndexes.Clear; advstringgrid1.SortIndexes.Add(3); advstringgrid1.SortIndexes.Add(7); advstringgrid1.SortIndexes.Add(1); advstringgrid1.QSortIndexed; end; end; end;
Delphi project & source files for downloading included in the main demos distribution for Delphi.
×