title: Data Table not Allowed to resize column
body: <p>I have a datagridview in my VB app.
  I cannot resize the columns. I populate the datagridview with a datatable. The property of my datagridview (AllowUserToReziseColumn) is set to true.</p>
  
  <p><img src="https://i.stack.imgur.com/0GCDi.png" alt="enter image description here"></p>
  
  <p>I CAN Resize in the red circle with the green check beside it. But it seems like the rest of it is the Data table. Any insight?</p>
  
  <p>Populate DataGrid Code</p>
  
  <pre><code>Using conn As SqlConnection = New SqlConnection(ConnectionString)
      conn.Open()
      Using comm As SqlCommand = New SqlCommand(sqlquery, conn)
          Dim rs As SqlDataReader = comm.ExecuteReader
          Dim dt As DataTable = New DataTable
          dt.Load(rs)
          datgDXLog.DataSource = dt
      End Using 'comm
      conn.Close()
  End Using 'conn
  </code></pre>
  
  <p>I even reiterate allowusertoresizerows in the prepaint</p>
  
  <pre><code> datgDXLog.AllowUserToResizeColumns = True
          If datgDXLog.Rows.Count &gt;= 3 Then
              If datgDXLog.Rows(e.RowIndex).Cells(3).Value &gt;= 3 Then
                  datgDXLog.Rows(e.RowIndex).DefaultCellStyle.ForeColor = Color.Red
              End If
          End If
  </code></pre>
  
  <p>I believe my problem is the fact that it is a data table. It makes me think that the datagridview properties do not control this, however I can reorder the column headers when I change the property (AllowUsertoOrderColumns) to True.</p>