Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ToolTipText Property

DataGridViewColumn.ToolTipText Property

Gets or sets the text used for ToolTips.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

'Declaration
Public Property ToolTipText As String

Property Value

Type: System.String
The text to display as a ToolTip for the column.

The column's ToolTip displays when the mouse pointer rests on the column header.

The following code example shows how to set a column's ToolTip. This code example is part of a larger code example provided for the DataGridViewColumn class.

Private Sub ToolTips()
    Dim firstColumn As DataGridViewColumn = _
        dataGridView.Columns(0)
    Dim thirdColumn As DataGridViewColumn = _
        dataGridView.Columns(2)
    firstColumn.ToolTipText = _
        "This is column uses a default cell."
    thirdColumn.ToolTipText = _
        "This is column uses a template cell." _
        & " Changes to one cell's style changes them all." 
End Sub

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft