Hi,
Problem is that after 5 second tooltip is hidden and if i have set time 30 sec for tooltip then next ultragrid cell tooltip is not updated as per mouse move.
My Code is here:
void _Grid_MouseEnterElement(object sender, UIElementEventArgs e)
{
UltraGridCell cell = e.Element.GetContext(typeof(UltraGridCell)) as UltraGridCell;
UltraToolTipInfo utti = _toolTipManager.GetUltraToolTip(m_grid);
if (cell != null)
utti.ToolTipText = cell.Text;
}else
utti.ToolTipText = string.Empty;
}
OR
I have tried below code also;
Point prevCellPoint = Point.Empty;
void Grid_MouseMove(object sender, MouseEventArgs e)
UltraGrid grid = sender as UltraGrid;
UltraToolTipManager _toolTipManager = new UltraToolTipManager();
UltraToolTipInfo utti = _toolTipManager.GetUltraToolTip(grid);
utti.ToolTipText =
string.Empty;
Point screenpoint = Control.MousePosition;
Point clientpoint = grid.PointToClient(screenpoint);
Infragistics.Win.
UIElement uiElement = m_grid.DisplayLayout.UIElement.ElementFromPoint(clientpoint);
UltraGridCell cell = uiElement.GetContext(typeof(UltraGridCell)) as Infragistics.Win.UltraWinGrid.UltraGridCell;
if (prevCellPoint != clientpoint)
//_toolTip.SetToolTip(grid, cell.Text);
prevCellPoint = clientpoint;
else
Please suggest
Hi Priyanka,
Thank you for posting in our forums.
Can you please clarify your requirements? How long do you want the tooltips to be shown? Do you want the tooltips to appear permanently for each cell the mouse passes through? Please describe what your goal is and I will be glad to help you implement it.
I am looking forward to hearing from you.
I want the tooltips to appear permanently for each cell the mouse passes through.
So i used below code:
UltraToolTipManager _utoolTipManager =new UltraToolTipManager();
_utoolTipManager.AutoPopDelay = 0;
And it is working.
When "Content is wider than the cell then Tooltips are automatically displayed in this situation."
So my question is that "How to hide these automatically displayed tooltip for that cell?"
Please suggest earlier.
Thank you for the clarification.
Removing the default tooltips, when the cell content is wider than the cell itself, can be achieved using the CreationFilter interface. Through it you have access to the different UIElements of the grid and to their TooltipInfo property. If you set this property to null, you can disable the tooltips. Here is an example implementation of the CreationFilter interface:
class CustomCreationFilter :IUIElementCreationFilter
public void AfterCreateChildElements(UIElement parent)
if (parent is CellUIElement && parent.ToolTipItem != null)
parent.ToolTipItem = null;
public bool BeforeCreateChildElements(UIElement parent)
return false;
For more information about the interface please visit this link:
http://help.infragistics.com/Help/Doc/WinForms/2012.2/CLR4.0/HTML/Win_Creation_Filter.html
I have attached a sample demonstrating this suggestion.
Please let me know if you have any additional questions.
Automatically Tooltip displayed problem is solved using UltraGrid property.
Now my question is that When I move mouse from GridCell to GridHeader then GridHeader display previous GridCell tooltip text.
Please suggest how to clear Tooltip Text on GridHeader when i move mouse from previous GridCell to GridHeader?
Thank you for the reply.
You can hide the tooltip by calling the HideTooltip method of the UltraTooltipManager. This can be done in the MouseEnterElement event, by checking if the element is HeaderUIElement and using the HideTooltip method if it is.
I have attached a modified version of the sample demonstrating this approach.
Hello Priyanka,
I am just checking about the progress of this issue. Let me know if Dimitar's suggestion worked for you or if you need our further assistance.
Thank you for using Infragistics Components.
My requirement was The tool tip will close when the user moves their mouse away from the row.so used below code
Using above code tooltip set as infinite.because i want infinite tooltip until user not move mouse.
But now my problem is when user move mouse then ultragrid cell tooltip is not updated.
Can you please suggest.
Thanks,
Priyanka