Using VB 2008. I have a form with a text box and a button on it. The button displays another form with a datagridview from which I want the user to select from to populate the text box. On RowHeaderMouseClick, I populate the text box field from the first form with the value of the first cell in the selected row, then hide the second form, mission accomplished. However, the way I am assigning the value seems extremely hokey (wordy). Is there a better way to do this?
The line of code is:
Form4.TextBox1.Text = DoctorsDataGridView.CurrentRow.Cells(0).Value.ToString
Seems kinda roundabout to me, but... it works so maybe I should just shut up?
Thanks,
Bill P.