Link to home
Start Free TrialLog in
Avatar of PeterErhard
PeterErhard

asked on

DataGrid Question

When a user double clicks on a particular row inside a DataGrid how can I capture the values in the first three cells of that row the user clicked on?
Avatar of davidrichardson
davidrichardson

Add the following to the datagrid click event

 Dim S As Integer
  S= Datagrid1.CurrentCell.RowNumber
        Datagrid1.Item(r, 0)  
        Datagrid1.Item(r, 1)  
        Datagrid1.Item(r, 2)

What do you want do do with them ?
Avatar of PeterErhard

ASKER

Thanks for that. I want to transfer the values to text boxes.
ASKER CERTIFIED SOLUTION
Avatar of davidrichardson
davidrichardson

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks - will try it out.
You probably worked it out but it should be

Txtbox1.TEXT
The datagrid double click event isnt the best there is, i found this very usefull

http://dotnetjunkies.com/WebLog/demiliani/archive/2004/02/16/7338.aspx
Had already figured that out but thanks a lot.