Articles in this section
Category / Section

How to set tooltip for cells in WinForms GridListControl?

The tooltip can be set for the cells using CellTipText property and this property can be set by handling the QueryCellInfo event in WinForms GridListControl.

C#

//Event subscription.
this.gridListControl1.Grid.QueryCellInfo += Grid_QueryCellInfo;
 
//Handling the QueryCellInfo event.
private void Grid_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
    if (e.RowIndex != 0)
        e.Style.CellTipText = e.Style.CellValue.ToString();
}

VB

'Event subscriptions
AddHandler Me.gridListControl1.Grid.QueryCellInfo, AddressOf Grid_QueryCellInfo
 
'Handling the QueryCellInfo event
Private Sub Grid_QueryCellInfo(ByVal sender As Object, ByVal e As GridQueryCellInfoEventArgs)
      If e.RowIndex <> 0 Then
            e.Style.CellTipText = e.Style.CellValue.ToString()
      End If
End Sub

The image illustrates the tooltip displayed in the GridListControl.

Set the tooltip for cells in GridListControl


Samples:

C#: Tooltip

VB: Tooltip

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied