I have a grid and want to show a tooltiptext when you hover the mouse over to that particular cell where i set the tooltiptext, but its not showing any tooltip text. I even tried the displaylayout.Override.TipStyleCell = TipStyle.Show; but no help.
This is my code: (ChildCell is a one of a cell in the ultragrid)
String ToolTip = "Original Projected Amt: {0}", 100); ChildCell.ToolTipText = ToolTip; ChildCell.Value = 200;
//just in case i also set an image for this cell using ChildCell.Appearance.Image
Hi,
This seems like it should work. What event are you using to set the ToolTipText?
Is it possible you are loading a layout into the grid at some point after this code is called that might be setting TipStyleCell back to Hide? You might try putting a button on the form that simply displays the TipStyleCell setting for the band.Override and the DisplayLayout.Override at run-time, just to be sure.
I also have this problem. the ToolTipText of UltraGridCell does't displayed (never).
I wrote that code in MouseEnterElement event, and when I set the tooltipText for the current cell (from e), I update the TipStyleCell to Show, and the toolTip does not display. What should I do?
this is my code:
private void ultraGrid1_MouseEnterElemnt(object sender, UIElementEventArgs e) { UltraGridCell cell = e.Element.GetContext(typeof(UltraGridCell)) as UltraGridCell; if ((cell != null) && (cell.Column.Equals(ultraGrid1.Rows.Band.Columns["PersonName"]))) { ultraGrid1.DisplayLayout.Override.TipStyleCell = TipStyle.Show; cell.ToolTipText = "___" + cell.Text; //tip.ShowAlways = true; //tip.SetToolTip(cell.GetUIElement().Control, cell.ToolTipText + "___"); }
}
If I use with ToolTip of Windows it's work good, but I want to use with ToolTipText of UltraGridCell.
thanks.
Okay, my guess is that MouseEnterElement is too late. The mouse is already inside the cell at that point, and the grid is probably using the MouseEnterElement event to detect when the mouse enters the cell so it knows when to show the tooltip.
I recommend using InitializeRow instead.
I changed to use the InitializeRow event, but the ToolTipText is never shown.
Maybe there are properties that affect the toolTip?
Thanks.
Other than setting the ToolTipText on the cell, there's nothing more you need to do - unless you are setting TipStyleCell and explicitly turning off the tooltips for that column.
Just to be sure, I tried it out in a simple sample project and it's working just fine for me. I have attached my sample here so you can try it out.