We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback
Platform : WinForms
|
Category : Datagrid

How can I get celltips or tooltips to vary from cell to cell in my DataGrid

One way to do this is to use a ToolTip control and reset the control text as the mouse moves from cell to cell. Below is a derived DataGrid class that implements this idea. The main points are:

Have members that track the current hitRow and hitCol where the mouse is.

  • In a MouseMove handler, do a HitTest on the mouse location to see if there is a new hit cell. If so, set the hitRow & hitCol, and hook the tooltip to hold your text according to the cell. In our sample, we just display the string value of the grid cell.
  • Finally, in the MouseMove handler, after setting a new text in the tooltip, set the tooltip active so it can show itself in due time.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon