且构网

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

在DataGridView中当前所选行的索引

更新时间:2023-01-27 18:19:37

还有就是RowIndex$c$c>属性的CurrentCell$c$c>属性DataGridView的。

There is the RowIndex property for the CurrentCell property for the DataGridView.

datagridview.CurrentCell.RowIndex

处理的SelectionChanged$c$c>事件,并找到所选择的行的索引如上

Handle the SelectionChanged event and find the index of the selected row as above.