开发者

Remove default selection row Datagrid View

开发者 https://www.devze.com 2023-02-03 11:27 出处:网络
In DataGridView there is a row selected and highlighted by default. How can this default selec开发者_高级运维tion and highlighting be removed?I figured it out myself.

In DataGridView there is a row selected and highlighted by default. How can this default selec开发者_高级运维tion and highlighting be removed?


I figured it out myself.

After populating the DataGrid, I called the following method:

datagrid.ClearSelection();


I found that faking the prevention of selection worked better for me.

See also here for a more thorough solution.

0

精彩评论

暂无评论...
验证码 换一张
取 消