title: Display an image from datagridview to a picturebox
body: <p>Can anyone help me with this one? The scenario is that when I click any columns in a datagridview it will display the image to a picturebox</p>
  
  <pre><code>Private Sub DataGridView1_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
  
      If e.RowIndex &gt;= 0 Then
          Dim row As DataGridViewRow
          row = Me.DataGridView1.Rows(e.RowIndex)
  
          lblProperty.Text = row.Cells("Column1").Value.ToString
          txtType.Text = row.Cells("Column2").Value.ToString
          txtPrice.Text = row.Cells("Column3").Value.ToString
          txtBed.Text = row.Cells("Column4").Value.ToString
          txtBath.Text = row.Cells("Column5").Value.ToString
          txtFootages.Text = row.Cells("Column6").Value.ToString
          txtStatus.Text = row.Cells("Column7").Value.ToString
          txtYear.Text = row.Cells("Column8").Value.ToString
          txtDesc.Text = row.Cells("Column9").Value.ToString
  
          Dim bytes As [Byte]() = row.Cells("Column10").Value
          Dim ms As New MemoryStream(bytes)
          pbImage.Image = Image.FromStream(ms)
  
          txtDate.Text = row.Cells("Column11").Value.ToString
          txtAddress.Text = row.Cells("Column12").Value.ToString
          txtStories.Text = row.Cells("Column13").Value.ToString
  
      End If
  End Sub
  </code></pre>
  
  <p>It has an error Unable to cast object of type 'System.String' to type 'System.Byte[]'.</p>