Assuming you are using Template fields in your datagrid then check what the SortExpression is set to for the User Name column - if it is set to the User Id then set it to the name of the column you want to sort by.
Alternatively you can create an event handler for the OnSorting event of a GridView and sort the data in your code behind page - MSDN link below.
GridView.Sorting Event at MSDN[
^]
Kind Regards