Hi all,
I have Datagridview with some columns. All the Columns are TextboxColumn with Readonly=True.The Data in the rows contains details of id,startdate and enddate. When I move the mouse over the id it not displaying any tooptip.But when I move over any cell which shows date(Textboxcolumn), it is showing tooptip.Please see the attachment.Is it bug on Datagridview ?
Dana
Please mark you thread resolved using the Thread Tools as shown
No it's not a bug. The grid only shows that tip if the cell isn't displaying all the data. As you can see, the values in the StartTime and EndTime columns are too long so an ellipsis is used to indicate that there's more data. Only then will the tip be displayed, specifically so you can see the hidden data. Why would you need a tip if all the data is already visible in the cell?
No!!!!!!!!!!!!!!!!1
DatagridView cell can show tooltip for the data which is being fully visible.
there is code for that
Code:
'Take Tooltip1 if needed
Private Sub DataGridView1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DataGridView1.MouseMove
Dim pt As Drawing.Point
pt.X = e.X
pt.Y = e.Y
Dim hti As DataGridView.HitTestInfo
hti = DataGridView1.HitTest(e.X, e.Y)
If hti.Type = DataGridViewHitTestType.Cell Then
DataGridView1.Rows(hti.RowIndex).Cells(hti.ColumnIndex).ToolTipText = DataGridView1.Rows(hti.RowIndex).Cells(hti.ColumnIndex).Value
End If
End Sub