DataGridView控件

DataGridView控件

当前行的类

DataGridViewRow

获取当前行

DataGridView对象.CurrentRow

获取当前选中的行集合

DataGridView.SelectedRows

获取当前行的所有单元格

DataGridView对象.CurrentRow.Cells

获取当前行的所有单元格中下标为n的单元格

DataGridView对象.CurrentRow.Cells[n]

获取单元格对象的值

单元格对象.Value

获取指定行列的单元格

DateGridView对象[列索引,行索引]

获取当前选中的单元格

DataGridView对象.CurrentCell

获取单元格所在行的行索引

单元格.RowIndex

获取选中的单元格集合

DateGridView对象.SelectedCells

获取选中的单元格集合中第n号索引的单元格

DateGridView对象.SelectedCells[n]

猜你喜欢

转载自blog.csdn.net/qq_50722361/article/details/110921092