Note that this does not work if the grid has been sorted. Instead use
the CurrencyManager.
=======================================================
//dgCusomters is the DataGrid
CurrencyManager cm;
cm = (CurrencyManager)dgCustomers.BindingContext[
dgCustomers.DataSource, dgCustomers.DataMember];
DataRow dr = ((DataRowView)cm.Current).Row;
=======================================================
'dr' now refers to the actual DataRow from the bound DataTable that is
currently selected in the grid.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.