1) Check the values from the SortExpressions collection of the master table to see which columns are filtered at that time
2) Subscribe to the SortCommand event of the grid where to determine the new sort order and the sort expression access the second argument in the handler.