Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
150
Tool Tip Image on grid row
posted
I want to associate a tooltip with an image to a row in a grid.  I have added a ultratooltip manager to the grid and am trying

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

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi Tom,

        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

Reply Children