title: Difference between DataView.Sort and DataTable.OrderBy().AsDataView()?
body: <p>I have a <code>DataGridView</code> which is bound to a <code>DataTable</code> that contains a column of custom types that I need to sort by.  This custom type (<code>MyCustomType</code>) implements <code>IComparable&lt;MyCustomType&gt;</code> which is how I wanted the sorting to work.</p>
  
  <p>I tried 2 methods to create a <code>DataView</code> which I would use as the grid's data source:</p>
  
  <pre><code>MyDataTable dt = new MyDataTable();
  DataView dv = new DataView(dt);
  dv.Sort = "MyCustomField";
  </code></pre>
  
  <p>This did not really work properly - it "almost" worked, but sometimes my rows would not be sorted correctly.</p>
  
  <p>Second method:</p>
  
  <pre><code>MyDataTable dt = new MyDataTable();
  DataView dv = dt.OrderBy(row =&gt; row.MyCustomField).AsDataView();
  </code></pre>
  
  <p>This seems to be doing what I want.  My question is, what's the difference between these two methods?  Is it possible that <code>DataView.Sort</code> is <strong>not</strong> using my <code>IComparable&lt;T&gt;</code> implementation, and the LINQ-enabled <code>DataView</code> <strong>is</strong>?  Why would that be the case?</p>
  
  <p>Furthermore, does anyone know about the relative performance of non-LINQ-enabled and LINQ-enabled <code>DataView</code>s?  It seems like if there isn't a huge performance hit, there's no longer any reason to use the non-LINQ-enabled version.</p>