Subject Re: Sorting multiple columns
Author s.beames@mailbox.gu.edu.au
To sort on multiple columns:
OrderingItems-> LastFirst=LASTNAME,FIRSTNAME;LASTNAME
DESC,FIRSTNAME DESC

If you use:
LastFirst=LASTNAME,FIRSTNAME;LASTNAME,FIRSTNAME DESC
it will only order the FIRSTNAME column as descending!

HTH,
Steve

--- In IBObjects@y..., "Don Schoeman" <ds@c...> wrote:
> Stupid question:
>
> I have a TIB_Grid and the user can sort and search on most of it's
columns.
> How do I sort the table on multiple columns using the
> TIB_Query.OrderingItems property. For example, the table contains
the
> following rows (ordered by FIRSTNAME):
>
> FIRSTNAME LASTNAME
> Jacques Villeneuve
> Michael Schumacher
> Ralf Schumacher
> Rubens Barrichello
>
> If the user then orders the table by LASTNAME, the FIRSTNAME column
must
> still be sorted, for example:
>
> FIRSTNAME LASTNAME
> Rubens Barrichello
> Michael Schumacher
> Ralf Schumacher
> Jacques Villeneuve
>
> By looking at the sample applications it looks like I should be
able to do
> it through TIB_Query.OrderingItems, but how?
>
> Best Regards,
> Don Schoeman