[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

DataGrid Question

Posted on 2004-11-18
7
Medium Priority
?
194 Views
Last Modified: 2010-04-23
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?
0
Comment
Question by:PeterErhard
  • 4
  • 3
7 Comments
 
LVL 7

Expert Comment

by:davidrichardson
ID: 12619160
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 ?
0
 

Author Comment

by:PeterErhard
ID: 12619170
Thanks for that. I want to transfer the values to text boxes.
0
 
LVL 7

Accepted Solution

by:
davidrichardson earned 2000 total points
ID: 12619187
Just Use

Dim S As Integer
  S= Datagrid1.CurrentCell.RowNumber
        Txtbox1 = Datagrid1.Item(r, 0)  
        Txtbox2 = Datagrid1.Item(r, 1)  
        Txtbox3 = Datagrid1.Item(r, 2)
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:PeterErhard
ID: 12619212
Thanks - will try it out.
0
 
LVL 7

Expert Comment

by:davidrichardson
ID: 12619240
You probably worked it out but it should be

Txtbox1.TEXT
0
 
LVL 7

Expert Comment

by:davidrichardson
ID: 12619313
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
0
 

Author Comment

by:PeterErhard
ID: 12619923
Had already figured that out but thanks a lot.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Integration Management Part 2
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question