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
475
Setting tooltip on a UltraGrid cell dynamically
posted

I have an UltraGrid with cascading dropdown controls in a few columns.  Depending on the value of one dropdown control, I would like to change the ToolTipText property on the next column cell in that row.  I tried setting it in the UltraGrid's BeforeCellListDropDown event and below is the result.

I added a UltraToolTipManager and set the following

ruleTooltipManager.SetUltraToolTip(secondChoiceDropdown, new Infragistics.Win.UltraWinToolTip.UltraToolTipInfo("Select a Category", Infragistics.Win.ToolTipImage.None, null, Infragistics.Win.DefaultableBoolean.True));

That results in an empty tooltip bubble when hovering over the cell.  In fact, there's an empty tooltip bubble when hovering over any cell.

The next method, on a cell with a dropdown control that is populated in BeforeCellListDropDown

e.Cell.Row.Cells[ColumKey].ToolTipText = "Select a Category";

Nothing happens when hovering over that cell (I had a breakpoint on that line and it hit it)

Parents
  • 1700
    Offline posted

    Hello Sam,

    Instead of using the UltraToolTipManager, what I can suggest you is using the ToolTipText property of the UltraGridCell that you mentioned. The only difference is that it will be used inside the InitializeRow event. Each cell could be set with a specific ToolTipText and this tooltip could be based on specific value or any other information that can be obtained from the cells inside the row.

    Since you mentioned using dropdowns and dynamically setting the ValueList of the second dropdown and then setting the tooltip based on the first dropdown I am attaching a small sample application that demonstrates how to achieve it with what I have explained above.

    Please test the sample on your side and let me know if you have any questions.

    Regards,
    Ivan Kitanov

    DependentDropDownCellToolTip.zip

Reply Children