set up sorting on the grid