Sorting in Main Window and Details.