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
65
How to get the row/cell from the mouse point.
posted

I uses the Toolbar Manager as a context menu of my Grid. I want the context menu be shown only when I right-click the data row. And I want active the row even right-click it. Now my question is how to retrieve a row or cell via mouse point?

Parents
No Data
Reply
  • 270
    Offline posted
    >I uses the Toolbar Manager as a context menu of my Grid. I want the context menu be shown only when I right-click the data row. And I want active the row even right-click it. Now my question is how to retrieve a row or cell via mouse point?

    Mouse DOwn :

    Point mousePoint = new Point(e.X, e.Y);
    UIElement element =
    ((UltraGrid)this).DisplayLayout.UIElement.ElementFromPoint(mousePoint);
    UltraGridCell cell =
    element.GetContext(typeof(UltraGridCell)) as UltraGridCell;
    if (cell != null)
    {
    .....
Children