Skip to main content

Grid contextmenustrip disables column config menu

Comments

2 comments

  • Dapfor Team

    We’ve added this feature explicitly because if a header doesn’t contain columns, there is no way to display them.
    Therefore you can create your own implementation of the grid and change the default behavior:


    public class CustomGrid : Grid
    {
    protected override void OnMouseDown(MouseEventArgs e)
    {
    if (Equals(e.Button, MouseButtons.Right))
    {
    switch (HitTest(e.Location))
    {
    case HitTestInfo.HeaderEmptyRight:
    case HitTestInfo.HeaderGroupPanel:
    case HitTestInfo.HeaderSelector:
    return;
    }
    }
    base.OnMouseDown(e);
    }
    }



    Best regards,
    The Dapfor Team

    0
  • guest

    Your support is great!
    Thank you

    0

Please sign in to leave a comment.

Powered by Zendesk