title: Errors trying to Sort a datagrid (XAML / C#)
body: <p>should be a simple problems but i can't find a fix. I get these errors in my c#:</p>
  
  <blockquote>
    <p>'System.Windows.Controls.DataGrid' does not contain a definition for 'Sort' and no extension method 'Sort' accepting a first argument of type 'System.Windows.Controls.DataGrid' could be found (are you missing a using directive or an assembly reference?)</p>
  </blockquote>
  
  <p>and</p>
  
  <blockquote>
    <p>'System.Windows.Controls.DataGrid' does not contain a definition for 'Ascending' and no extension method 'Ascending' accepting a first argument of type 'System.Windows.Controls.DataGrid' could be found (are you missing a using directive or an assembly reference?)</p>
  </blockquote>
  
  <p>Here's my code:</p>
  
  <p>XAML:</p>
  
  <pre><code>&lt;DataGrid Grid.Row="0" Grid.Column="0" Grid.RowSpan="5" Margin="0 0 25 0"  AutoGenerateColumns="True" Name="studentData" IsReadOnly="True" ItemsSource="{Binding}" /&gt;
  </code></pre>
  
  <p>C#:</p>
  
  <pre><code>private void sortByName_Click(object sender, RoutedEventArgs e)
      {
          studentDataGrid.ItemsSource = studentClass;
          studentDataGrid.Sort(studentDataGrid.Columns[0], studentDataGrid.Ascending);
      }
  </code></pre>
  
  <p>What am i doing wrong?</p>
  
  <p>Thanks in advance.</p>