I have an Infragistics UltraGrid control. When I hover over a cell in the grid, it displays the contents of the cell as a tooltip for about 5 seconds. I want to increase this timeframe. I tried to override that property(AutoPopupDelay
) but it still does not work.
Try the following code as discussed on the Infragistics forum. You'll want to replace the ToolTipText
with the cell's value, but I assume your code already does that.
C#:
UltraGrid1.DisplayLayout.Override.TipStyleCell = TipStyle.Hide;
if (e.Element.GetAncestor(typeof(RowUIElement)) != null) {
if (object.ReferenceEquals(e.Element.GetType, typeof(RowAutoPreviewUIElement))) {
ToolTipInfo.ToolTipTitle = "Row Warnings";
ToolTipInfo.ToolTipText = "Your cell value";
UltraToolTipManager1.SetUltraToolTip(UltraGrid1, ToolTipInfo);
UltraToolTipManager1.ShowToolTip(UltraGrid1);
}
}
VB.NET:
UltraGrid1.DisplayLayout.Override.TipStyleCell = TipStyle.Hide
If e.Element.GetAncestor(GetType(RowUIElement)) IsNot Nothing Then
If e.Element.GetType Is GetType(RowAutoPreviewUIElement) Then
ToolTipInfo.ToolTipTitle = "Row Warnings"
ToolTipInfo.ToolTipText = "Your cell value"
UltraToolTipManager1.SetUltraToolTip(UltraGrid1, ToolTipInfo)
UltraToolTipManager1.ShowToolTip(UltraGrid1)
End If
End If