Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Hover over any cell in row

Posted on 2016-07-18
4
Medium Priority
?
64 Views
Last Modified: 2016-07-20
I'm using the DataGridView.  I want be hover over any cell in a row and display a tooltip.  The data in the tooltip is specific to the row, not the row.  How can I do this?
0
Comment
Question by:HLRosenberger
  • 2
  • 2
4 Comments
 
LVL 20

Expert Comment

by:Russ Suter
ID: 41717435
I can probably help you with this but I'm very confused about something in your original question (probably a typo) but I can't figure out what you mean when you wrote
The data in the tooltip is specific to the row, not the row.
Obviously that's a contradictory statement. Can you please clarify what you mean?
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 41717620
Sorry.  That's supposed to be:  tooltip is specific to the row, not the cell.
0
 
LVL 20

Accepted Solution

by:
Russ Suter earned 2000 total points
ID: 41717641
Gotcha!
All you would need to do is add an event handler to the CellToolTipTextNeeded method of the DataGridView control. Then just set the ToolTipText property as needed. Here's a super simple example:
Private Sub dataGridViewUpwardDependencies_CellToolTipTextNeeded(sender As Object, e As System.Windows.Forms.DataGridViewCellToolTipTextNeededEventArgs)
	e.ToolTipText = "This is row " + e.RowIndex.ToString()
End Sub

Open in new window

0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 41721200
thanks.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
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 .
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

885 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