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
2306
Block mouse click event when i resize a column
posted

Hello,

i'm handling on the grid the mouse_click event because when the user click on a cell i get the value and than make some operations. The problem is that the mouse click event is fired even if i resize the column header. For example: Click and hold the left button of the mouse, begin dragging and then release the left mouse button over the cell.

How can i block from firing the mouse_click event if i'm resizing a column?

 

thank you

Parents
  • 17259
    Verified Answer
    Offline posted

    Use MouseDown instaed of MouseClick, although MouseUp is usually better but it won;t solve your problem.

    If you want to know what is the element at the mouse pointer:

    UIElement uiElement = DisplayLayout.UIElement.ElementFromPoint(point);

    if (uiElement != null)

    {

    UltraGridCell cell = uiElement.GetContext(typeof(UltraGridCell)) as UltraGridCell;

     

    if (cell != null)

    ...

    }

Reply Children
No Data