Add sorting to the table.