C# – Disable default cell selection in datagridView

cwinforms

I have DataGridView to load some data programmatically. After inserting my data I am showing the DataGridView . Here by default the 1st row 0th column cell is selected. But I don't need that. I have tried to disable that option.

datagridviewname.currentcell=null   

But it will not work. Any body can help me to solve my problem.

Best Answer

Set CurrentCell Selected property to False like:

   dataGridViewName.CurrentCell.Selected = false;