Skip to main content

Grid header double click

Comments

1 comment

  • Dapfor Team

    Hi,

    You can easily specify UI elements for which you want to display the menu. Look at the following example:

     

    grid.DoubleClick += delegate
    {
        switch (grid.HitTest(grid.PointToClient(Cursor.Position)))
        {
            case HitTestInfo.Cell:
            case HitTestInfo.CellHorizontalSeparator:
            case HitTestInfo.CellVerticalSeparator:
            case HitTestInfo.EmptyBottom:
            case HitTestInfo.ExpansionButton:
            case HitTestInfo.GroupRow:
            case HitTestInfo.RowEmptyRight:
            case HitTestInfo.RowHierarchicalIndent:
          case HitTestInfo.RowSelector:
               contextMenu.Show(Cursor.Position);
               break;
        }    
    };

    Best regards,

    Dapfor

     

     

    0

Please sign in to leave a comment.

Powered by Zendesk