set up sorting in the grid-view