title: System.Data.DataTable - sort in alphabetical order
body: <p>I've got this code which populates a <code>SharpLibrary.WinControls.ListBoxEx</code></p>
  
  <pre><code>Dim MyListBox As SharpLibrary.WinControls.ListBoxEx
  Private dataTable As System.Data.DataTable
  dataTable  = GetNames ' Function that returns a DataTable
  MyListBox.Items.Clear()
   For count = 0 To dataTable.Rows.Count - 1
      MyListBox.Items.Add(dataTable.Rows(count)("Name"))
  Next
  </code></pre>
  
  <p>SharpLibrary is apparently some ancient graphical component API. 
  I want the data to be presented in alphabetical order. Is it possible to sort a <code>DataTable</code>?</p>
  
  <p>Edit: Another Solution:  </p>
  
  <pre><code>dataTable  = GetNames ' Function that returns a DataTable
  dataTable.DefaultView.Sort = "Name"
  MyListBox.Items.Clear()
   For count = 0 To dataTable.Rows.Count - 1
      MyListBox.Items.Add(dataTable.DefaultView.Item(count)("Name"))
  Next
  </code></pre>