First:
private CurrencyManager cm1;
..
..
..
Second: (Load event o constructor)
cm1 = (CurrencyManager) BindingContext[dataSet,"tableName"];
// this is the dataSet binding to the DataGrid
..
..
..
third: (some where at your particular event)
string menVar = (string)dataSet.tableName.Rows[cm1.Position]["fieldName"];
// now menVar have the value you want
MessageBox.Show(menVar );
Hope this help
MajorTom
PD: the CurrencyManager is the key object for know the actual position of
the rows of your dataset
"RajS" <s_********@hotmail.com> wrote in message
news:OU*************@TK2MSFTNGP11.phx.gbl...
Hi All,
I am new to C#. I was trying to get column values from a datagrid row(
user selected a row ) and show them in a messagebox.
How can I do that?.
Thanks for helping me.
-RajS