Return to Snippet

Revision: 2382
at February 6, 2007 18:16 by rengber


Initial Code
private void dataGrid1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
  try
  {
    DataGrid.HitTestInfo hti = dataGrid1.HitTest(e.X,e.Y);
    if(hti.Type == DataGrid.HitTestType.Cell) 
    {
      toolTip1.SetToolTip(dataGrid1, dataGrid1[hti.Row, hti.Column].ToString()); 
    }
  }
  catch{}
}

Initial URL
http://msdn2.microsoft.com/en-us/library/ms996485.aspx

Initial Description
Weird issue with Intellisense and the HitTestInfo class.  Just type it in, it will compile.

Initial Title
Display a ToolTip for a DataGrid Cell

Initial Tags
forms, windows

Initial Language
C#