'DataGridView Using shift / ctrl keys to check multiple row's checkboxes

I'm having problems checking checkboxes of multiple rows at one time using the shift key and FullRowSelect. The checkboxes are in the first column (0). It only checks the box in the row I click on. Any tips or advice is appreciated. Thanks in advance.

Here's what I have currently.

       private void dgv_On_CellClick(object sender, DataGridViewCellEventArgs e)
    {
        dgv_Off.ClearSelection();
        int colindex = dgv_On.CurrentCell.ColumnIndex;
        foreach (DataGridViewRow dgvOn in dgv_On.SelectedRows)
        {
            if (colindex == 0)
            {
                if (dgvOn.Selected)
                    dgvOn.Cells[0].Value = true;
                else
                {
                    dgvOn.Cells[0].Value = false;
                }
            }
        }
        contextMenuOff.Enabled = false;
        contextMenuOn.Enabled = true;
    }


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source