ultraToolTipManager1.SetUltraToolTip(e.Row.GetUserUI().Control, new Infragistics.Win.UltraWinToolTip.UltraToolTipInfo(@"TEXT<img style=""width:16px; height:16px;"" data=""" + imageAsText + @"""/>", Infragistics.Win.ToolTipImage.None, "Test Data", Infragistics.Win.DefaultableBoolean.True))
in the OnInitializeRow event. However I am getting an "e.Row.GetUIElement()' is null" error.
Thanks for any info in advance,
Tom
Hi Tom,
No, there's no way to do that, you will need to use the UltraToolTipManager if you want formatted text.
e.Row.ToolTipText from the OnInitializeRow event take formated text? This could be the fast solution.
Thanks,
What is "GetUserUI"? There is no such method that I am aware of. I guess maybe that's a typo and you meant you are using GetUIElement. That won't work, either. The SetUltraToolTip method takes a control, and a UIElement is not a control, even when it's not null. You can't assign a ToolTip to an individual cell like this.
Typically, what you would do in a case like this when you want to assign a tooltip to a part of a control, is set the tooltip on the entire control (in this case the grid) and change it based on the mouse position. To determine what cell the mouse is over, you would use the ElementFromPoint method along with GetContext. There are KB articles that describe how to do this:
HOWTO:UltraWinGrid Mouse Position and Cell Identification