You could get an order of the rows depends on the case by getPivotRows() method and in the received object you have member items which collect the right order.
Also, you could bind the PivotGrid to sortchanging event where you could get more information about the sorting process – ascending or descending; which column is used and so on.