.net – Access the Item bound to a DataGridView Row (WinForms)

.netdatagridviewwinforms

How would I access the bound item for a specific row for a DataGridView bound to a Custom Collection?

Best Solution

MSDN: DataGridViewRow DataBoundItem Property

The DataBoundItem property of the DataGridViewRow seems to do the trick!

var product = (Product) _grid.SelectedRows[0].DataBoundItem;