You should get hold of the data view the data grid uses. For that purpose,
use the code below:
CurrencyManager cm = (CurrencyManager)this.DataBindings[grid.DataSource,
grid.DataMember];
DataView view = (DataView)cm.List;
DataRowView rowView = view[cm.Position];
string firstName = rowView["FirstName"];
--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx
"X-Killer" <X-******@netscape.net> wrote in message
news:uN**************@TK2MSFTNGP10.phx.gbl...
I've played around the datagrid control for some time and can't find any
"rows" or "columns" property within it. What is the easiest way to find
out the content of each fields of a selected row in a datagrid?