PRODUCTS

FEATURED PRODUCT

Create modern-looking & feature-rich applications with over 280 components including award-winning grids, scheduling components, Office 2007/2003 ribbon & toolbars, calendars, application update and much more...

License only 175 EUR See More

SEARCH

LOGIN

Customer login to access products, support information & special benefits.

NEWS ALERTS

Add your e-mail address here to receive the monthly TMS Software alerts.

 

LINKS

EXAMPLE 37

TAdvStringGrid

example 37 : sorting on selected fixed rows of choice

TAdvStringGrid

This is a small demo for 2 new features in TAdvStringGrid 2.0 First, it is now possible to define the fixed row from where column sorting is controlled. Secondly, vertical cell alignment can now be controlled per cell through the OnGetAlignment event hander.

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.

The project and source files have been written with Delphi 6,7. To use these files in other versions of Delphi, ignore any remarks when opening the form files and save the files. After this, compilation can be done. The error messages are due to properties included in the Delphi 6 form file, but not available in lower versions of Delphi.  

Copyright © 1995 - 2008 TMS Software