且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在C#中的datagridview中只选择一行

更新时间:2022-03-08 06:16:28

这可能只是视觉呈现行选择方式的问题。它看起来像是在一行中选择了一个单元格。



将DataGridView的 SelectionMode 更改为当用户点击它时,FullRowSelect和整行将突出显示
This is probably just a problem with the way the row selection is presented visually. It will look like a single cell has been selected on a row.

Change the SelectionMode of the DataGridView to "FullRowSelect" and the entire row will be highlighted when the user clicks in it