By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,188 Members | 832 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,188 IT Pros & Developers. It's quick & easy.

VB.NET help

P: 1
I am looking at a way to get the value on column 2, when the user selects a row.
For example: the datagrid shows like this:

Row Name Location
1 Picture 1 c:\pic_1.bmp
2 Picture 2 c:\pic_2.bmp
3 Picture 3 c:\pic_3.bmp

I am able to get the value from using datagrid.currentcell.value.tostring, but I have to click exactly at the cell to get the current value.


If the user click on row 2, I want to get the value from LOCATION columns in row 2 (the value is "c:\pic_2.bmp"), usually in VB 6.0 I would write it like:

dim x as string
x = datagrid.columns(2).value

So x = c:\pic_2.bmp

Right now with datagrid.currentcell.value.tostring, the user have to click on "c:\pic_2.bmp" in order to get the correct value. So is there a way to code it so when user click the row, go get the value from LOCATION column?
Apr 24 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.