title: Winforms DataGridView Showing Blank Rows
body: <p>The code below is returning an empty datagridview. The gridview's column headers were added via the designer.</p>
  <p>Using a breakpoint in the ShowGrid() method at the dataAdapter.Fill(tblStats); statement, I've ascertained that the datatable is filled with the correct data.</p>
  <p>But when the form appears, the gridview is empty except for the column headers. The grid cells are created with a white background (not greyed out, as if the datasource were null), but the values are not there.</p>
  <p>What am I missing?</p>
  <pre><code>    private void ShowGrid()
      {
          string dbConnStr = &quot;Data Source=localhost;Initial Catalog=StatData;Persist Security Info=True;User ID=USERID;Password=PASSWORD&quot;;
          SqlConnection dbConn = new SqlConnection(dbConnStr);
          SqlCommand dbCmd = new SqlCommand();
          dbCmd.CommandType = CommandType.Text;
          dbCmd.CommandText = &quot;SELECT * FROM Statistics&quot;;
          dbCmd.Connection = dbConn;
          dbConn.Open();
          SqlDataAdapter dataAdapter = new SqlDataAdapter(dbCmd.CommandText, dbConn);
          DataTable tblStats = new DataTable();
          dataAdapter.Fill(tblStats);
          dgvStats.DataSource = tblStats;
      }
  </code></pre>