title: Treeview databinding to a DataTable
body: <p>I am new to WPF and would really appreciate help on an issue I'm struggling with.  I need to bind a <code>TreeViewItem</code> in a WPF <code>TreeView</code> in the main app's Menu. All I need is the correct syntax to bind the single datatable to <code>TreeViewItem</code> (XAML and the codebehind) this is what I have so far.  Please provide code with your suggestion, your help is appreciated. To make things clear once again I am just trying to Bind the <code>ItemList</code> <code>TreeViewItem</code>'s <code>ItemsSource</code>. The <code>TreeView</code> shows the 5 rows in the table, but it shows <code>System.Data.DataRow</code> instead of the real value, Your helps appreciated </p>
  
  <p>XAML</p>
  
  <pre><code>&lt;Window x:Class="WPFToolkit.Window1"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:local="clr-namespace:WPFToolkit"
          Title="Window1" Height="300" Width="300"&gt;
    &lt;Window.Resources&gt;
    &lt;/Window.Resources&gt;
    &lt;Grid&gt;
      &lt;TreeView Name="SampleTree" Margin="-9,0,0,0"&gt;
        &lt;TreeViewItem Header="Create List" MouseDoubleClick="CreateCodeset_Click" 
                      IsEnabled="True"/&gt;
        &lt;TreeViewItem Header="Search List" MouseDoubleClick="SearchCodeSet_Click"/&gt;
        &lt;TreeViewItem Header="List Items" Margin="15,0,0,0"&gt;
          &lt;TreeViewItem Name="ItemList" Header="Codeset 1" 
                        Style="{StaticResource listMenuItem}"&gt;
          &lt;/TreeViewItem&gt;
        &lt;/TreeViewItem&gt;
      &lt;/TreeView&gt;
    &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>C#</p>
  
  <pre><code>public void CreateList()
  {
      DataTable tbl = new DataTable("Items");
      tbl.Columns.Add("Name");
  
      DataRow row = tbl.NewRow();
      row["Name"] = "Fruits";
      tbl.Rows.Add(row);
  
      DataRow row2 = tbl.NewRow();
      row["Name"] = "Vegetables";
      tbl.Rows.Add(row2);
  
      DataRow row3 = tbl.NewRow();
      row["Name"] = "Meats";
      tbl.Rows.Add(row3);
  
      DataRow row4 = tbl.NewRow();
      row["Name"] = "Drinks";
      tbl.Rows.Add(row4);
  
      DataRow row5 = tbl.NewRow();
      row["Name"] = "Bread";
      tbl.Rows.Add(row5);
  
      //This is not working
      ItemList.ItemsSource = tbl.Select();
  }
  </code></pre>