Question

Does anyone know if the Infragistics UltraGrid control provides functionality similar to that of DataGridView.HitTestInfo?

Was it helpful?

Solution

Check this out.

They don't convert the coordinates, but they use a special Infragistics grid event (MouseEnterElement) to get the element, which the mouse currently hovers over.

Maybe it helps.

OTHER TIPS

There's a .MousePosition property which returns System.Drawing.Point and "Gets the position of the mouse cursor in screen coordinates" but I'm using an older version of their UltraWinGrid (2003).

They have a free trial download, so you could see if they've added it to their latest and greatest :o)

If you had a MouseEventHandler for the UltraGrid then you can do the following:

UltraGrid grid = (UltraGrid)sender;

UIElement element = grid.DisplayLayout.UIElement.ElementFromPoint(new Point(e.X, e.Y));

You can then cast the element depending on its expected type using element.GetContext():

 UltraGridCell cell = (UltraGridCell)element.GetContext(typeof(UltraGridCell));
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top