i have checked whether the checkbox is checked or not and if the checkbox is checked, then set the corresponding row selected.I wrote this code in the CurrentCellDirtyStateChanged,CellClick and RowLeave events of the dataGridView.
for (int i = 0; i< dataGridView1.RowCount; i++)
{
if(Convert.ToBoolean(dataGridView1.Rows[i].Cells["checkboxname"].Value)== true)
{
dataGridView1.Rows[i].Selected = true;
}
else
{
dataGridView1.Rows[i].Selected = false;
}
}
Then dragging could not make the rows selected.