In DataGridView
there is a row selected and highlighted by default. How can this default selection and highlighting be removed?
Asked
Active
Viewed 1.5k times
8

SharpC
- 6,974
- 4
- 45
- 40

Afnan Bashir
- 7,319
- 20
- 76
- 138
2 Answers
19
I figured it out myself.
After populating the DataGrid
, I called the following method:
datagrid.ClearSelection();

Dave Clemmer
- 3,741
- 12
- 49
- 72

Afnan Bashir
- 7,319
- 20
- 76
- 138
0
I found that faking the prevention of selection worked better for me.
See also here for a more thorough solution.