Added sorting handlers for new table template. #1188