Hello
how is it possible to read cell value and display tooltip on mouse hover in a grid .
i tryed the
UIElement element = ultraGrid1.DisplayLayout.UIElement.ElementFromPoint(mousePoint);
{
}
but it does not work
My guess is that MousePosition returns you the position of the mouse in screen coordinates, not control coordinates. You can probably convert the coords using grid.PointToClient. Or you can use the MouseMove even and use e.X and e.Y.
Or, you could use grid.DisplayLayout.UIElement.LastElementEntered, instead of ElementFromPoint.
Or, you could use MouseEnterElement and MouseLeaveElement, as suggested above. :)
Casually, there is another post where they suggest to do the following:
//assuming you have a ToolTip control
void grid_MouseLeaveElement(object sender, Infragistics.Win.UIElementEventArgs e) { toolTip.SetToolTip(poolGrid, null); } void grid_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e) { if (e.Element is EditorButtonUIElement) { EditorButton button = e.Element.GetContext(typeof(EditorButton)) as EditorButton; if (button.Tag != null) toolTip.SetToolTip(grid, button.Tag.ToString()); } }