Home Forums WinForms controls Xceed Grid for WinForms Mouse rollover on grid cell

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #15934 |

    Hi

    Is it possible to show a tooltip or something similar so when I do a mouseover on a cell the tooltip shows the contents of a different cell.

    Hope that makes sense

    Thanks

    Nick Steele

    Imported from legacy forums. Posted by Nick (had 2047 views)

    Xceed Support
    Member
    Post count: 5658

    Here is an example built from the <a href=”http://doc.xceedsoft.com/products/Xceedgrid/How_to_display_tooltips.html”>documentation</a&gt;.

    <code>
    private void Form1_Load( object sender, EventArgs e )
    {
    //…

    foreach( Cell cell in dataRowTemplate1.Cells )
    {
    cell.MouseEnter += new EventHandler( cell_MouseEnter );
    }

    toolTip1 = new ToolTip();
    }

    void cell_MouseEnter( object sender, EventArgs e )
    {
    toolTip1.SetToolTip( gridControl1, ( ( DataCell )sender ).ParentRow.Cells[0].Value.ToString() );
    }

    private ToolTip toolTip1;
    </code>

    Imported from legacy forums. Posted by CharlesB (had 3045 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.