Implimented table sorting in allactivities.