How to get the selected co value?

  • Thread starter Thread starter John Britto
  • Start date Start date
J

John Britto

Hi Guys,

I'm creating one or more dynamic datagrids in a form.
I have attached a contextment to the datagrid.
On selection of one menu item I want to get the first colum's value of the
selected row.
How to I do that?

thx for ur help
John
 
You need code like

DataGrid.HitTest hti = dgEnqs.HitTest(e.X,e.Y);

in the MouseMove event handler for the DataGrid. Then in the menu select
event handler there needs to be

string RequiredData = (string)dataGridName[hti.Row,0]
 
Back
Top