title: Binding a 2D array into a Datagrid
body: <p>So my case is that I want to populate a 2d array from two fields in my database.
  I've got a problem with assigning an array with a value which is a database field
  and the second one is displaying the array in datagrid, i've coded dgv2.Datasource = myArray but it's still returning an error message.</p>
  
  <p>This is my code:</p>
  
  <pre><code>Dim msql As String = "select item_id from detail"
      Dim arayT(,) As String
  
      CMD = New MySqlCommand(msql, conn.konek)
  
      Try
          Dim res= CMD.ExecuteReader()
  
  
          While res.Read()
              For i As Integer = 0 To x - 1
                  For j = 0 To y - 1
  
                      arayT(i, j) = res.GetString("item_id")
  
  
                  Next j
              Next i
          End While
  
      Catch ex As Exception
          MessageBox.Show("ERROR")
  
      End Try
      dgv2.DataSource = arayT
  </code></pre>
  
  <p>So my question is 
  first, how to assign record column from database as value into my 2d array? (i'm still not sure my coding is right)
  second, how to view the 2d array into datagrid, i mean binding 2d array into datagrid</p>
  
  <p>A few requests from me... please don't ask me to use a list of(t) or use LINQ cause I'm still not too familiar with them.</p>
  
  <p>i have done some fix in my code but it didn't worked nicely..here is my latest screenshot
  <img src="https://i.stack.imgur.com/6xHuT.png" alt="enter image description here"></p>