Adding grid sorting.