Beispiel #1
0
 private void DataGrid_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         gridMenu.Show(CaptchaDataGrid, CaptchaDataGrid.PointToClient(Cursor.Position));
     }
 }
Beispiel #2
0
 private void DataGrid_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         if (!(CaptchaDataGrid.SelectedRows.Count > 1))
         {
             CaptchaDataGrid.ClearSelection();
         }
         try
         {
             CaptchaDataGrid.Rows[e.RowIndex].Selected = true;
             cellMenu.Show(CaptchaDataGrid, CaptchaDataGrid.PointToClient(Cursor.Position));
         }
         catch { }
     }
 }