title: Getting cell values into variables in DataGridView based on Grid coordinates
body: <p>Im working with a DataGridView with an imported CSV file where the values are delimited
  with (,).. The grid works perfectly fine. </p>
  
  <p>My <em>ultimate</em> goal is to hide the grid out of view from the user and access the data in the grid based on the coordinates of the grid specified i.e (The cell in column 5, row 6 contains the value "Taco") and I want to save that value to a variable...</p>
  
  <p>Eventually I want to loop through all the values of a column and save them to individual variables to be later used. So far, this is what I have...
  <hr>
  `</p>
  
  <pre><code>  Dim sReader As New StreamReader("book1.csv")
  
      Dim Record() As String
  
      For x As Integer = 0 To 17
  
          DataGridView1.Columns.Add(x, x)
      Next
  
  
      While sReader.Peek() &lt;&gt; -1
          Record = sReader.ReadLine().Split(",")
          DataGridView1.Rows.Add(Record)
  
      End While
  
  
  
      Dim cellval As String
      Dim col As Integer
      Dim row As Integer
      cellval = DataGridView1.CurrentCell.Value
      col = DataGridView1.CurrentCellAddress.X
      row = DataGridView1.CurrentCellAddress.Y
  
      Label1.Text = cellval
      Label2.Text = col
      Label3.Text = row
  </code></pre>
  
  <p>`</p>
  
  <hr>
  
  <p>Presently, that will only display the data in column 0, row 0 in those labels... </p>
  
  <p><strong>Note:</strong> 17 in the for loop is the amount of columns in the data i provided.. that number will never change.</p>
  
  <p>Many thanks in advance.</p>