title: Select first row of DataGridView and display cell contents in text boxes
body: <p>I am working on a small VB application that retrieves customer data (ID, Name, Last Name, Purchase Detail) from an SQL table and displays it on a DataGridView. </p>
  
  <p>There are 4 text fields on the same form, and my goal is that every time a DataGridView row is clicked on, the contents of its cells will be displayed on those fields. </p>
  
  <p>So far everything´s working fine, except for this: Once the form finishes loading and the DataGridView is displayed, the first row of the grid is selected (highlighted) but its data is not displayed on the text fields.</p>
  
  <p>If I click once on that row, the data IS displayed.</p>
  
  <p>So my problem is that I have not been able to programatically make the data from the 1st row to be automatically displayed on the text fields once the form finished loading.</p>
  
  <p>I have tried </p>
  
  <p>Form1.DataGrid1.Rows(0).Selected = true </p>
  
  <p>and also</p>
  
  <p>Form1.DataGrid1.Rows.GetFirstRow(DataGridViewElementStates.Visible)</p>
  
  <p>but neither code works. The 1st row is highlighted but the data is not displayed on the text fields unless I click on the row.</p>
  
  <p>I was thinking about programatically simulate a mouse click on the 1st row, but I have no idea if that´s a feasible solution.</p>
  
  <p>Any help you can provide will be much appreciated. Many thanks in advance!</p>
  
  <p>Randy</p>