I have a GridView that is using a LinqDataSource which is tied to a table in my database. This table of mine has a int foreign key. In my presentation layer, using TemplateField in Gridview, i hide the foreign key value and make another call to the database to show the name of it's associated name so it's more readable for the user.
However, when i click on the header of the foreign key to sort its column, it sorts by the id value, rather than the string value of it's associated name. How can i make this Gridview sort by it's name and not by it's foreign key value?