A co-worker solved my problem. By wrapping the source object in a wrapper, you can then define a SortBLANK, which just returns the data as int instead of string. I then use SortMemberPath to set the sorting for that call. Note, this only works for the problem of numeric only sorting.
XAML(Partial):
<sdk:DataGrid.Columns>
<sdk:DataGridTextColumn Header="MAC" FontSize="12" Binding="{Binding macaddr}" Width="100"/>
<sdk:DataGridTextColumn Header="Upload Rate" SortMemberPath="SortUpload" FontSize="12" Binding="{Binding uploadRate}" Width="3*"/>
<sdk:DataGridTextColumn Header="Download Rate" SortMemberPath="SortDownload" FontSize="12" Binding="{Binding downloadRate}" Width="3*"/>
</sdk:DataGrid.Columns>
Code-Behind(Partial):
public class OnlineDevicesWrapper
{
public string macaddr{get;set;}
public string uploadRate { get; set; }
public string downloadRate { get; set; }
public int SortUpload
{
get
{
return int.Parse(uploadRate);
}
}
public int SortDownload
{
get
{
return int.Parse(downloadRate);
}
}
}