Example #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void DGV_Applications_MouseUp(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         try
         {
             DataGridView.HitTestInfo hti = DGV_Applications.HitTest(e.X, e.Y);
             if (hti.RowIndex >= 0)
             {
                 CMS_Applications.Show(DGV_Applications, e.Location);
             }
         }
         catch (Exception lEx) { }
     }
 }
Example #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DGV_Applications_MouseDown(object sender, MouseEventArgs e)
        {
            try
            {
                DataGridView.HitTestInfo hti = DGV_Applications.HitTest(e.X, e.Y);

                if (hti.RowIndex >= 0)
                {
                    DGV_Applications.ClearSelection();
                    DGV_Applications.Rows[hti.RowIndex].Selected = true;
                    DGV_Applications.CurrentCell = DGV_Applications.Rows[hti.RowIndex].Cells[0];
                }
            }
            catch (Exception)
            {
                DGV_Applications.ClearSelection();
            }
        }