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
455
ToolTip
posted

Anyone,

I'm trying to add a tooltip to my ultragrid when the user hovers over a cell. My first step was to just get the tooltip to display when the user was over a cell and then I was going to check for a specific cell in the next step. I can't get the following code to work to display the cell. I have the ultraToolTipManager on the form.

My code is below. Thanks, Kris

if (e.Element is Infragistics.Win.UltraWinGrid.CellUIElement)

{

// Get the cell location.

Point pt = new Point(e.Element.Rect.X, e.Element.Rect.Y);

// Get a refernce to the cell.

Infragistics.Win.UltraWinGrid.UltraGridCell cell = igrdAgentPool.GetChildAtPoint(pt);

// Make sure the mouse is over a cell.

if (cell != null)

{

Infragistics.Win.UltraWinToolTip.
UltraToolTipInfo tipInfo =

new Infragistics.Win.UltraWinToolTip.UltraToolTipInfo("Click Button", ToolTipImage.Info, "Delete Record", DefaultableBoolean.True);

// Display the tooltip.

ultraToolTipManager.SetUltraToolTip(igrdAgentPool, tipInfo);

ultraToolTipManager.ShowToolTip(igrdAgentPool);

}

}

else

ultraToolTipManager.HideToolTip();

Parents
No Data
Reply
  • 280
    posted

    hi i have also ultra grid in vb.net  and i show tooltip on it plz show the below code  i have seven field 

    ' Set tool tip on a header column.
    Me.UltraGrid1.DisplayLayout.Bands(0).Columns("id").Header.ToolTipText = "field contain user id ."
    Me.UltraGrid1.DisplayLayout.Bands(0).Columns("name").Header.ToolTipText = "field contains user name ."
    Me.UltraGrid1.DisplayLayout.Bands(0).Columns("fathername").Header.ToolTipText = " field contains user fathername ."
    Me.UltraGrid1.DisplayLayout.Bands(0).Columns("address").Header.ToolTipText = "field contains user address."
    Me.UltraGrid1.DisplayLayout.Bands(0).Columns("marks").Header.ToolTipText = "field contains user marks ."
    Me.UltraGrid1.DisplayLayout.Bands(0).Columns("rollno").Header.ToolTipText = "field contains user rollno ."
    Me.UltraGrid1.DisplayLayout.Bands(0).Columns("qualification").Header.ToolTipText = "field contains user qualification "

    Dim row As UltraGridRow
    For Each row In Me.UltraGrid1.Rows
    'row.ToolTipText = String.Format("Sample tool tip for {0} index row.", row.Index)

    ' Tool tip can be set on individual cells as well.

    row.Cells(0).ToolTipText = String.Format("coloumn id for {0} index row.", row.Index)
    row.Cells(1).ToolTipText = String.Format("coloumn name for {0} index row.", row.Index)
    row.Cells(2).ToolTipText = String.Format("coloumn fathername for {0} index row.", row.Index)
    row.Cells(3).ToolTipText = String.Format("coloumn address for {0} index row.", row.Index)
    row.Cells(4).ToolTipText = String.Format("coloumn marks for {0} index row.", row.Index)
    row.Cells(5).ToolTipText = String.Format("coloumn rollno for {0} index row.", row.Index)
    row.Cells(6).ToolTipText = String.Format("coloumn qualification for {0} index row.", row.Index)
    Next

    if u want more more help plZ see my demo code i m sure that will help u

    http://ahmadkhalid44.blogspot.com/2013/05/work-on-ultra-grid.html

Children
No Data