Solved

get datagridview field value on mouse click

Posted on 2006-12-01
3
201 Views
Last Modified: 2012-08-13
trying to get thevalue of the datagrid view and pass the value to a another form for a query
0
Comment
Question by:prowebinteractive
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
Kinger247 earned 500 total points
ID: 18056469
You can get the value like this (in vs2005), you didn't say which version you are using .. :

    Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
        Dim Value As String = DataGridView1.Rows(e.RowIndex).Cells(e.ColumnIndex).Value
    End Sub

0
 

Author Comment

by:prowebinteractive
ID: 18068607
need dbl click  is this possible
0
 
LVL 10

Expert Comment

by:Kinger247
ID: 18068666
Will you can still use (as is). Just don't use it untill you receive the double click event.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
I need help converting a bitmap to an image in VB.Net 1 44
get column names from table in vb.net 8 51
location of a form 2 25
get combo value in class 5 14
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

830 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