title: DataSet created in code not Binding to ListView
body: <p>I have a WPF User Control with a ListView in it that is created based on the DataSet that is passed to it:</p>
  
  <pre><code>public void PopulateList(DataSet ds) {
          listView.View = CreateGridViewColumns(ds.Tables[0]);
          listData.DataContext = ds.Tables[0];
  }
  
  private GridView CreateGridViewColumns(DataTable dt) {
          // Create the GridView
          var gv = new GridView {AllowsColumnReorder = true};
  
          // Create the GridView Columns
          foreach (DataColumn item in dt.Columns) {
              var gvc = new GridViewColumn
                            {
                                DisplayMemberBinding = new Binding(item.ColumnName),
                                Header = item.ColumnName,
                                Width = Double.NaN
                            };
              gv.Columns.Add(gvc);
          }
  
          return gv;
      }
  </code></pre>
  
  <p>Now I create the user control in code and call it's PopulateList with the appropriate dataset and this is where the problems are starting:</p>
  
  <p>If I pass in a dataset that was created from a call to the database the list view shows all the data but if i pass in a DataSet that i created in code the ListView shows the Columns but will not show the data</p>
  
  <pre><code>//This is a function that hides the DB call return type is DataSet    
  var dsPatientSmokingStatusHistory = DataRepository.PatientSmokingStatusProvider.GetHistory(PatientId);
          //radGridViewPatientSmokingStatus.DataSource = dsPatientSmokingStatusHistory.Tables[0];
  
          var dt = new DataTable();
          string c1 = "Date".PadLeft(23).PadRight(23);
          string c2 = "Status".PadLeft(20).PadRight(50);
          dt.Columns.Add(c1);
          dt.Columns.Add(c2);
          int i = 0;
          foreach (DataRow row in dsPatientSmokingStatusHistory.Tables[0].Rows) {
              var dataRow = dt.NewRow();
              dataRow[c1] = ((DateTime)row["Date"]).ToString("MM/dd/yyyy");
              dataRow[c2] = row["Status"].ToString();
              dt.Rows.Add(dataRow);
              dt.Rows[i].AcceptChanges();
              i++;
          }
  
          DataSet ds = new DataSet();
          dt.TableName = "Table";
          ds.Tables.Add(dt);
          ds.AcceptChanges();
  
          smokingStatusGrid.GridWidth = 455;
          smokingStatusGrid.GridHight = 97;
          //This line does not show data
          smokingStatusGrid.PopulateGrid(ds);
          //This line will show data
          smokingStatusGrid.PopulateGrid(dsPatientSmokingStatusHistory);
  </code></pre>
  
  <p>Is there a difference between these two datasets that i don't know about that is preventing me from databinding to it?</p>
  
  <p>Also the user control is being used as an ElementHost in a WinForms application (not sure if this makes a difference)</p>