Currently, the My DataGridView control is sorted using the Sort property of the associated data, but it does not do what I want.
I have a column with a name Employeethat displays as "Last Name First Name."
When I sort by Employee, the user name Amy Z_Lastname is preceded by the name John A_Lastname, which means that I prefer to sort the last names.
I can break the Employee line into 3 parts, include the ones in the DataTable, and set the sorting to "Lastname, Firstname", and then hide the Lastname and Firstname columns.
I'd rather learn to override IComparer by default (or something else) to provide instructions on how to sort as I want (the answer I would prefer).
source
share