title: Sorting Datagrid with DataGridTemplateColumn
body: <p>I am using a DataGrid and the ItemSource is Bound to a list of strings.
  The problem is that the sorting is not working. 
  The header is enabled and can be clicked but the data is not sorted. </p>
  
  <pre><code>&lt;DataGrid ItemsSource="{Binding CollectionNames}" SelectedItem="{Binding CurrentName}" SelectionUnit="FullRow" CanUserAddRows="False" AutoGenerateColumns="False" SelectionMode="Single" &gt;
                  &lt;DataGrid.Columns&gt;
                      &lt;DataGridTemplateColumn Width="400" CanUserSort="True"  SortMemberPath="Name"&gt;
                          &lt;DataGridTemplateColumn.HeaderTemplate&gt;
                              &lt;DataTemplate&gt;
                                  &lt;TextBlock Text="Name" Foreground="#FF40A4E0" HorizontalAlignment="Left" VerticalAlignment="Center"&gt;&lt;/TextBlock&gt;
                              &lt;/DataTemplate&gt;
                          &lt;/DataGridTemplateColumn.HeaderTemplate&gt;
                          &lt;DataGridTemplateColumn.CellTemplate&gt;
                              &lt;DataTemplate&gt;
                                  &lt;ContentControl&gt;
                                      &lt;TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding}"/&gt;
                                  &lt;/ContentControl&gt;
                              &lt;/DataTemplate&gt;
                          &lt;/DataGridTemplateColumn.CellTemplate&gt;
                      &lt;/DataGridTemplateColumn&gt;
                  &lt;/DataGrid.Columns&gt;
                  &lt;DataGrid.CellStyle&gt;
                      &lt;Style TargetType="DataGridCell"&gt;
                          &lt;Setter Property="BorderThickness" Value="0"/&gt;
                      &lt;/Style&gt;
                  &lt;/DataGrid.CellStyle&gt;
              &lt;/DataGrid&gt;
  </code></pre>
  
  <p>I think the problem is <strong>SortMemberPath="Name"</strong> but I dont know what to put instead of "Name"</p>