Extracting Data from a Grid Bound to a Typed DataSet- .Net Framework

The following C# code sample demonstrates how to extract data from a DataGrid control bound to a typed DataSet. You can convert code between C# and VB.NET at this website.

DataGridView grid = (DataGridView)sender;
DataGridViewRow gridRow = grid.Rows[e.RowIndex];
DataRowView rowView = (DataRowView)gridRow.DataBoundItem;
MyDataTable.MyDataTableRow dataRow = (MyDataTable.MyDataTableRow)rowView.Row;