Solved

Hover over any cell in row

Posted on 2016-07-18
4
20 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 500 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 improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now