Hi,
setting of sort field property directly just update sorting marks.
If you want to update sorting of dataset then use one of following procedures. It set sorting for dataset and then update sort properties.
{ manually resort grid - calls Sorter.DoSort procedure or OnChangeSortEx or OnChangeSort event }
function ReSort: boolean;
{ set new sort properties and call Sorter DoSort procedure or OnChangeSort procedure,
obsolete, use ChangeSortEx for multifield sorting }
function ChangeSort(const NewSortFieldName: string; NewSortDesc: boolean): boolean;
{ set new sort properties and call Sorter DoSort procedure or OnChangeSortEx procedure }
function ChangeSortEx(const NewSortFieldNames, NewSortDirections: string): boolean;
Also following could be useful for you:
{ returns position of FieldName in SortFieldName (0=not found) }
function PosInSortField(const FieldName: string): integer;
{ returns sort direction for field (true=DESC, false=ASC) }
function GetSortDirection(const FieldName: string): boolean;
{ returns array of sort fields }
function SortFieldNamesArr: TSortFieldNames;
{ returns array of sort directions }
function SortDirectionsArr: TSortDirections;
I hope it helps
TomaS