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
280
set infinite tooltip on Ultragrid cell
posted

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 (cell != null)

            {              

               

if (prevCellPoint != clientpoint)

                {

                    utti.ToolTipText = cell.Text;

                   

//_toolTip.SetToolTip(grid, cell.Text);

                    prevCellPoint = clientpoint;

                }         

            }

           

else

            {

                utti.ToolTipText =

string.Empty;

            }

        }

 

Please suggest

 

 

Parents Reply Children
No Data