This is a migrated thread and some comments may be shown as answers.

ShowItemToolTips?

4 Answers 266 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Deborah
Top achievements
Rank 1
Deborah asked on 17 Sep 2010, 09:50 PM
What is ShowItemTooltips supposed to do? I turned it on for my bound grid and don't see any tooltips.

What I was hoping for was to see the full text of each cell as I hover over the cell.

Is there a way to do this automatically? Or do I have to write the code to display cell tooltips?

Thanks!

4 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 23 Sep 2010, 07:19 AM
Hi Deborah,

Thank you for contacting us.

This property enables or disables showing tool-tips in general. However, you should assign the tool-tip text explicitly. This can be done by handling the ToolTipTextNeeded event in RadGridView. Please consider the GridView >> Customize >> Tooltips example in our demo application, it demonstrates this scenario.

If you have further questions, do not hesitate to ask.

Kind regards, Jack
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Deborah
Top achievements
Rank 1
answered on 20 Oct 2010, 12:43 AM
I am trying to show the value of the field in the tooltips. But I don't seem to be able to get the actual cell's value.

For example, if the cell is formatted as a short date or as a currency, I don't get the formatted value.

As another example, if the cell is a combobox bound with a ValueMember of an Id and a DisplayMember of a string, I get the value member. So instead of displaying "Jones, Johnny", I get 42 in the tooltip.

Is there a way to display the field's displayed value in the tooltip?
0
Accepted
Deborah
Top achievements
Rank 1
answered on 20 Oct 2010, 01:11 AM
Never mind. I got it. Here it is in case someone else ever needs it:

Private Sub myGrid_ToolTipTextNeeded(ByVal sender As Object, ByVal e As Telerik.WinControls.ToolTipTextNeededEventArgs) Handles Me.ToolTipTextNeeded
    Dim gridCell As GridDataCellElement = TryCast(sender, GridDataCellElement)
    Dim tooltipText As String = String.Empty
    If gridCell IsNot Nothing AndAlso
            String.IsNullOrWhiteSpace(gridCell.ToolTipText) Then
        If Not String.IsNullOrWhiteSpace(gridCell.Text) Then
            tooltipText = gridCell.Text
        End If
        gridCell.ToolTipText = tooltipText
    End If
End Sub

Is there a way to mark my post as the answer? ;-)
0
Stefan
Telerik team
answered on 22 Oct 2010, 04:20 PM
Hi Deborah,

We have marked the post as answer for you.

If you have any other questions, do not hesitate to contact us.
 
Sincerely yours,
Stefan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Deborah
Top achievements
Rank 1
Answers by
Jack
Telerik team
Deborah
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or