Datagrid data value

K

Kenneth H. Young

How do I get the value of a spcific field in a datagrid. On a double
click of a given row I would like to get the value of that rows email field.

Private Sub DataGrid1_DoubleClick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DataGrid1.DoubleClick

Dim mailVal As String

mailVal = Me.DataGrid1. ???





Thanks for the assistance.

Kenneth H. Young
 
K

Ken Tucker [MVP]

Hi,

Dim pt As Point

Dim hti As DataGrid.HitTestInfo

pt = DataGrid1.PointToClient(Cursor.Position)

hti = DataGrid1.HitTest(pt)

If hti.Type = DataGrid.HitTestType.Cell Then

MessageBox.Show(DataGrid1.Item(hti.Row, hti.Column).ToString)

End If



Ken

---------------------------

How do I get the value of a spcific field in a datagrid. On a double
click of a given row I would like to get the value of that rows email field.

Private Sub DataGrid1_DoubleClick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DataGrid1.DoubleClick

Dim mailVal As String

mailVal = Me.DataGrid1. ???





Thanks for the assistance.

Kenneth H. Young
 
K

Kenneth H. Young

I am accustom to programming in MS Access. Some things seam much
simpler in VB for Access. Any way thanks for the feed back and I will give
your suggestion a try.

Thank you,
 
P

Peter Huang [MSFT]

Hi

If you still have any concern on this issue, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

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

Top