We uncovered a problem with the BoundList (used by DataGrid as a DataSource) when trying to sort models who's value is null. The issue is easily fixed but comes into play in the ApplySort method. It is not properly handling null and should return 0 when comparing two items that are null. Specifically this code:
if (valx != null && valy != null)
int result = valx.CompareTo(valy);
if (result != 0)
else if (valx != null)
The final else should be changed to:
else (valy != null)
this will cause the null null comparison to fall through to the surrounding return 0 which is how it should sort.
Hope this helps ...