Results 1 to 4 of 4

Thread: [RESOLVED] [2005] ToolTip on Gridview

  1. #1

    Thread Starter
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Resolved [RESOLVED] [2005] ToolTip on Gridview

    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
    Attached Images Attached Images  
    Please mark you thread resolved using the Thread Tools as shown

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] ToolTip on Gridview

    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?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: [2005] ToolTip on Gridview

    The grid only shows that tip if the cell isn't displaying all the data
    I think this has to be noted. Thanks for the point
    Please mark you thread resolved using the Thread Tools as shown

  4. #4
    Junior Member
    Join Date
    Jun 2008
    Posts
    17

    Re: [RESOLVED] [2005] ToolTip on Gridview

    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
    Dont trust girls

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width