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

Tooltip when text exceeds column width

3 Answers 89 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ronald
Top achievements
Rank 2
Ronald asked on 30 Jan 2013, 02:39 PM
Hi,

I received a request from a customer about showing tooltips on cells when the cell contents exceeds the size of the cell.
Our windows forms client has that functionality using ms listview control. (See attached image.)

In my Silverlight application I display a thumbnail of the document when hoovering over the first column, so I thought I could set the tooltip in the same section: GridViewCell.MouseEnter.

In the MouseEnter handler I measure the width of the column and a temporary Textbox with the contents of the column. If it exceeded I set the tooltip. (Expecting some problems with datetime columns etc.)
var tb = new TextBlock { Text = cell.Value.ToString() };
if (tb.ActualWidth > cell.ActualWidth)
{
 cell.SetValue(ToolTipService.ToolTipProperty, tb.Text);
 return;
}
cell.SetValue(ToolTipService.ToolTipProperty, null);

And the result: No tooltip gets displayed, is there a way to accomplish this?

Kind regards,
Ronald

3 Answers, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 01 Feb 2013, 05:13 PM
Hello Ronald,

As it turns out, you can not achieve this functionality with the current implementation of RadGridView.

Please excuse us for the inconvenience caused!


Kind regards,
Yoan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Ronald
Top achievements
Rank 2
answered on 07 Feb 2013, 01:48 PM
Hi,

I'm using a popup control instead of the tooltipservice.
And the customer is happy with this solution, so I'm also happy!

Perhaps you can add this functionality in future releases of your nice products.

Best regards,
Ronald
0
Yoan
Telerik team
answered on 08 Feb 2013, 04:59 PM
Hello Ronald,

I have added your question to our Public Issue Tracking System as a feature request. You can find the PITS Issue here: Public URL 


There you may vote for it and you may follow its progress as well.

All the best,
Yoan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Ronald
Top achievements
Rank 2
Answers by
Yoan
Telerik team
Ronald
Top achievements
Rank 2
Share this question
or