2012-03-27 104 views
0

我正在使用Windows窗體應用程序的syncfusion網格控件 我想在網格中選擇多個單元格。並在右鍵單擊時,選擇應該保留。但是沒能獲得選擇留 這裏的mycode的syncfusion,上下文菜單,允許多個單元格選擇

private void theGrid_MouseDown(object sender, MouseEventArgs e) 
    { 
     theGrid.ListBoxSelectionMode = SelectionMode.None; 
     this.theGrid.AllowSelection = GridSelectionFlags.Any; 
     if (e.Button == MouseButtons.Right) 
     { 

      theGrid.ContextMenuStrip = contextMenuStrip1; 
      contextMenuStrip1.Visible = true; 

     } 
     else 
     { 
      contextMenuStrip1.Visible = false; 

     } 
    } 

回答

0

同時加載的形式或其他初始化控制相關的設置,保留上點擊右鍵選擇您可以處理以下設置。

this.theGrid.SelectCellsMouseButtonsMask = MouseButtons.Left; 
相關問題