Solved

vb.net select cell in datagrid

Posted on 2007-11-30
6
1,584 Views
Last Modified: 2013-11-26
I have a datagrid that looks like this:

1          a
2           b
3           c

When a user selectes the cell that 'b' is in I want to populate a label with that value.  I need it to do that for all the cells, not just 'b'.
Thanks
0
Comment
Question by:bergertime
  • 3
  • 3
6 Comments
 
LVL 21

Expert Comment

by:surajguptha
ID: 20384535
On click of the cell goto the datasource that you are binding to the grid and copy all the values in the abc column to the 123 columsn and bind the datasource back to the grid
0
 
LVL 2

Author Comment

by:bergertime
ID: 20384641
And that is going to put the text of the cell in a label.text or textbox.text.?
0
 
LVL 21

Expert Comment

by:surajguptha
ID: 20385009
If that label is also a part of the grid. Yes
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:bergertime
ID: 20385086
I guess my question wasn't clear.....the label or textbox (the control) is not part of the grid.  I want the user to be able to click on a cell in a datagrid and whatever is in that cell will populate a control outside the datagrid.
0
 
LVL 21

Accepted Solution

by:
surajguptha earned 500 total points
ID: 20389465
0
 
LVL 2

Author Closing Comment

by:bergertime
ID: 31412007
Thanks
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

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 …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

756 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