Grid - Sorting on Select column

I have a grid with a column, project_id. I set the column to type SELECT to find the project information in the project table so the grid displays the project name rather that the ID. When I sort the column, it sorts by project_id but I want it to sort by the project name. How can I do that?

Anyone have an idea or a push in the right direction?

The problem is you Column type select, when you sort for this one, SC sort is for the code internal. you can solve that changing the sql adding in the FROM the other table and in SELECT set newtable.name_proyect.

so SC show text directly to from and it can be sorted.