[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Getting selected value from a hidden column cell of DataGridView in VB.Net  Windows Application

Posted on 2007-08-09
7
Medium Priority
?
3,334 Views
Last Modified: 2013-11-26
Hello Experts,

Platform : VB.Net  Windows Application

How to get a selected cell value from a hidden column (that is, visible=false) in a DataGridView. I have set a DataPropertyName for that column. Is there any way to access the value using the DataPropertyName? If possible, how?

Thanks in advance.
Pal.
0
Comment
Question by:PaulsonGeorge
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 19668106

www.springerlink.com/index/j3m1606542174875.pdf 

How to: Get the Selected Cells, Rows, and Columns in the Windows Forms DataGridView Control
http://msdn2.microsoft.com/en-us/library/x8x9zk5a.aspx
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 19668114
First link is not good (copy-paste error from me)
0
 
LVL 39

Expert Comment

by:appari
ID: 19668127
you can try like this

gridName.SelectedRows(0).Cells("columnName")
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 6

Accepted Solution

by:
ToFro earned 1500 total points
ID: 19668134
This should get the string value from the column named hiddenColumn for the first row in the DataGridView named Datagridview1:

Datagridview1.Rows(0).Cells("hiddenColumn").Value.ToString()

Note that hiddenColumn is the name of the DataGridViewColumn, not the DataPropertyName. Can you work with that, or  you have to get it by DataPropertyName?
0
 
LVL 4

Author Comment

by:PaulsonGeorge
ID: 19668196
Hi all,

First of all thanks for all your responses.

But, sorry to say that, NONE of the solution works for me.
To appari and ToFro :
Did you try this? Is it working for you? please reply. It's very urgent one.

Thank you once again.
PaL.
0
 
LVL 4

Author Comment

by:PaulsonGeorge
ID: 19668221
OK..

Yes... Its working !!! :)

I had been trying all these for a couple of hoursm even before posting the question here. Any way, The problem was with the DataPropertyName. I gave a wrong name.

Thank you very much again,
PaL.
0
 
LVL 6

Expert Comment

by:ToFro
ID: 19668430
> I had been trying all these for a couple of hoursm even before posting the question here. Any way,
> The problem was with the DataPropertyName. I gave a wrong name.

I would be very interested in knowing how you managed to get the column data by DataPropertyName?
Or were you perhaps trying to get the data by DataPropertyName instead of DataGridViewColumn name?
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
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