We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to set Supertooltip for cells in WinForms GridControl?

Platform: WinForms |
Control: GridControl

Set SuperToolTip

To set the SuperToolTip for each cell in a GridControl, you can use MouseMove event. By using this event, you can set the tooltip to get the corresponding row and column index by setting the PointToRowCol method.

The following code example explains how to set SuperToolTip for each cell in a GridControl by using MouseMove event.


private void gridControl1_MouseMove(object sender, MouseEventArgs e)
    int row, col;
    GridCurrentCell cc = this.gridControl1.CurrentCell;
    if (this.gridControl1.PointToRowCol(new Point(e.X, e.Y), out row, out col) && (col != hoverCol || row != hoverRow)) 
        hoverCol = col;
        hoverRow = row;
        Rectangle rect = this.gridControl1.GetCellRenderer(row, col).GetCellBoundsCore(row, col, false);
        Point screenPoint = this.gridControl1.PointToScreen(new Point(rect.Left, rect.Top));
        ToolTipInfo tinfo = new ToolTipInfo();
        tinfo.Header.Text = string.Format(" row {0}, column {1}", hoverRow, hoverCol);
        superToolTip1.Show(tinfo, screenPoint);



Private Sub gridControl1_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs)
Dim superToolTip1 As New SuperToolTip()  
Dim row, col As Integer
  Dim cc As GridCurrentCell = Me.gridControl1.CurrentCell
    If Me.gridControl1.PointToRowCol(New Point(e.X, e.Y), row, col) AndAlso (col <> hoverCol OrElse row <> hoverRow) Then
 hoverCol = col
 hoverRow = row
 Dim rect As Rectangle = Me.gridControl1.GetCellRenderer(row, col).GetCellBoundsCore(row, col, False)
 Dim screenPoint As Point = Me.gridControl1.PointToScreen(New Point(rect.Left, rect.Top))
 Dim tinfo As New ToolTipInfo()
 tinfo.Header.Text = String.Format(" row {0}, column {1}", hoverRow, hoverCol)
 superToolTip1.Show(tinfo, screenPoint)
    End If
End Sub


The following screenshot displays the Grid with SuperToolTip.


Show the tooltip to grid cell

View Sample in GitHub

Reference link: https://help.syncfusion.com/windowsforms/grid-control/tooltip

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile