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]
 

Ask a Question

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.

Ask a Question

Back
Top