Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已将我的 datagridview 上的选择模式设置为仅单元格选择。但是当我单击行标题时,我需要选择整行。我将如何做到这一点?
dataGridView1.SelectionMode = DataGridViewSelectionMode.RowHeaderSelect;
这将允许您选择整行以及单个单元格。
您也可以在 datagridview 的属性中设置它 - SelectionMode 设置为 FullRowMode