I have a DataGrid which is binded to a collection of models. My model has a string property called Position which is of type string, but contains an integer value.
My problem is, when sorting this column values get sorted as 1, 10, 2 instead of 1, 2, 10.
Is there anyway to handle this MVVM style without handling the Sorting event of the DataGrid in code-behind?
Bear in mind I cannot change the type of the property.
int PositionNumber {get { return int.Parse(Position); } }property in the model and use that instead.