How would you be able to Capture the Value of a Cell when the User Selects a Row?

I guess that you are looking for a particular column in your datagridview.

DataGridView1.Item(0, DataGridView1.SelectedRows.Item(0).Index).Value

I have A Datagrid view. And I want the User to be able to select a Row, but when They Select that row is Gets the Value of the 2nd Cell in the 2nd Column and puts it in a TextBox.

textbox.text = DataGridView1.Item(1, DataGridView1.SelectedRows.Item(0).Index).Value

Make sure you've disabled multiple rows selection or that you've tested that the results meet your requirements.

textbox.text = DataGridView1.Item(1, DataGridView1.SelectedRows.Item(0).Index).Value

Make sure you've disabled multiple rows selection or that you've tested that the results meet your requirements.

Thanks very Much. This Worked ;)

This question has already been answered. Start a new discussion instead.