Thank you for the clarification. The dimensions of a cell include their border width which is not included when the text is measured. So you need to calculate the real dimensions of a cell before subtracting the BorderWidth twice from the height and the width. You can use the following modficated version of my previous code snippet:
sender, Telerik.WinControls.ToolTipTextNeededEventArgs e)
GridDataCellElement dataCell = sender
TextPart textPart =
SizeF size = textPart.Measure(
SizeF sizeInCell = textPart.Measure(
cellWidth = dataCell.ColumnInfo.Width - dataCell.BorderWidth * 2;
cellHeight = dataCell.Size.Height - dataCell.BorderWidth * 2;
(size.Width > cellWidth || cellHeight < sizeInCell.Height)
toolTipText = dataCell.Text;
dataCell.ToolTipText = toolTipText;
If you need additional assistance, please do not hesitate to write us back.
All the best,
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?
Telerik Public Issue Tracking
system and vote to affect the priority of the items.