title: WPF DataGrid sort by ComboBox field
body: <p>I have WPF datagrid with combox column (ID is real value, Desc is displayed value) and when I click on header of that column automatically sorts by real value (ID). I want to sort by displayed value. </p>
  
  <p>My WPF datagrid has 4 columns: IdPerson, DescSchool, IdSchool and School. Column "School" is comboBox with this values:ItemSource = schoolTable.DefaultView, SelectedValueBinding = new Binding("IdSchool"), SelectedValuePath="IDSchool", DisplayMemberPath = "DescSchool"</p>
  
  <p>schoolTable is a table with 2 columns - IDSchool and DescSchool. That table is used just as datasource for combobox.</p>
  
  <p>I tried the solution when I have set SortMemberPath = "DescSchool" and initially, this works - when I click on the header of the combobox column sorting is done by displayed value (because it read value of the other column) and not by real value. But, if I change the value of the combobox, value of the column "DescSchool" is still the same so after that sorting doesn't work anymore properly.</p>
  
  <p>Any idea?</p>