Solved

Hover over any cell in row

Posted on 2016-07-18
4
31 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

821 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