Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1705
When a user doubleclicks a row, how can I tell which column the mouse was over?
posted

I need to be able to determine which column the user's mouse was in when they doubleclicked a grid row.  How can I do this?

Parents
  • 69832
    Offline posted

    Depending on which event you handle, you might have to get the cirsor position differently, but this is the gist:

    Example:
    UltraGrid control = sender as UltraGrid;
    UIElement controlElement = control.DisplayLayout.UIElement;
    UIElement elementAtPoint = controlElement != null ? controlElement.ElementFromPoint( e.Location ) : null;
    UltraGridColumn column = elementAtPoint.GetContext( typeof(UltraGridColumn) ) as UltraGridColumn;

Reply Children