I have a RadGrid where I'm truncating the display of cell data in order to preserve page real estate. I want to show the full cell content in a RadToolTip.
On the server, in the GridItemDataBound server-side event handler, I'm transforming the values of each cell for display. On the client, I'm truncating the display data using text-overflow:ellipsis. On the server, I'm creating a RadToolTip with the full value, and shoving it into the Page object's Controls collection:
var item = (GridDataItem)e.Item;
var cell = item["Flavor"];
cell.Text = reallyLongFlavorNameValue;
var tooltip = new RadToolTip();
tooltip.Title = "Flavor";
tooltip.Text = reallyLongFlavorNameValue;
tooltip.TargetControlID = cell.ID;
tooltip.IsClientID = false;
tooltip.RelativeTo = ToolTipRelativeDisplay.Element;
this.Controls.Add(tooltip);
I'm assuming the rest of the values can be defaults.
However, when I show the page, the tooltip never shows.
What am I missing?
Thanks