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

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)