WFA_psychometric_chart.Form_handler.dataGridView1_CellMouseClick C# (CSharp) Method

dataGridView1_CellMouseClick() private method

private dataGridView1_CellMouseClick ( object sender, System.Windows.Forms.DataGridViewCellMouseEventArgs e ) : void
sender object
e System.Windows.Forms.DataGridViewCellMouseEventArgs
return void
        private void dataGridView1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                if(e.RowIndex >= 0 && e.ColumnIndex == 0)
                {
                    if(dataGridView1.Rows[e.RowIndex].Cells[0].Value != null) {
                    Point p = new Point(e.Location.X, e.Location.Y);
                        indexSelectedForDeletion = e.RowIndex;
                    contextMenuStrip1.Show(dataGridView1,p);

                    }
                }

            }
        }